I suspect the problem is with the actual Base64 data. Otherwise it looks good to me. See this fiddle where a similar scheme is working. You may try specifying the character set.

<div>
  <p>Taken from wikpedia</p>
  <img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUA
    AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
        9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />
</div>
Run code snippetEdit code snippet Hide Results Copy to answer Expand

You can try this Base64 decoder to see whether your Base64 data is correct or not.

Answer from VinayC on Stack Overflow
🌐
Base64 Image Encoder
base64-image.de
Convert Images to Base64 Online — Free Encoder & Optimizer | base64-image.de
By embedding images directly into your HTML or CSS as base64 strings, you eliminate separate HTTP requests for image files.
Discussions

Render HTML Base64 images
I am sending out SMTP emails with an HTML body that includes some embedded images using Base64Strings. The emails and images look perfect when viewing in-house in Outlook. When the emails are sent to an external account such as Gmail the images don’t display and all you can see in the Base64 ... More on forum.uipath.com
🌐 forum.uipath.com
5
0
May 14, 2024
Base64 Image not displaying as an image
I am trying to transfer base64 images from a website to Notes using HTML. As a test, iv’e written the script below which gets a “normal” image from a website via url. The second image is the base64 code of a simple image of a Red Dot (from Wikipedia). As described in the script comments, ... More on macscripter.net
🌐 macscripter.net
0
0
June 2, 2023
Displaying a BASE64 image from the address bar as HTML
Put the data URI in the src attribute of an img tag. For the size, use CSS to set whatever size you want. More on reddit.com
🌐 r/webdev
7
2
December 28, 2021
Create PNG from base64 encoded html.Img src
So I have an html.Img component in my Dash app that displays an image based on user input. Since some precomputation is required for the initial image to be created, it is saved as a local file temporarily to encode into… More on community.plotly.com
🌐 community.plotly.com
7
0
January 11, 2023
🌐
Sentry
sentry.io › sentry answers › html › how do i display a base64 image in html?
How do I display a Base64 image in HTML? | Sentry
January 15, 2024 - If you want to embed an image directly into an HTML file’s code, instead of linking to an image file, and you don’t have access to JavaScript, then encoding the image as Base64 is the only solution.
🌐
GeeksforGeeks
geeksforgeeks.org › html › how-to-display-base64-images-in-html
How to Display Base64 Images in HTML (With Example) - GeeksforGeeks
3 weeks ago - Online Base64 Encoder: Websites ... base64 command on the terminal: ... Once you have the Base64 string, now embed it in your HTML <img> tag....
🌐
UiPath Community
forum.uipath.com › help › studio
Render HTML Base64 images - Studio - UiPath Community Forum
I am sending out SMTP emails with an HTML body that includes some embedded images using Base64Strings. The emails and images look perfect when viewing in-house in Outlook. When the emails are sent to an external account such as Gmail the images don’t display and all you can see in the Base64 ...
Published: May 14, 2024
🌐
Elmah.io
elmah.io › tools › base64-image-encoder
Base64 Image Encoder - Convert any image file or URL online
With Base64 Image Encoder, you can convert any image file or URL to either Base64, HTML, CSS, JSON, or XML online. Everything happens in the browser.
Find elsewhere
🌐
MacScripter
macscripter.net › scripting forums › applescript | mac os x
Base64 Image not displaying as an image - AppleScript | Mac OS X - MacScripter
June 2, 2023 - I am trying to transfer base64 images from a website to Notes using HTML. As a test, iv’e written the script below which gets a “normal” image from a website via url. The second image is the base64 code of a simple image of a Red Dot (from Wikipedia). As described in the script comments, ...
🌐
Google Sheets
sheets-pratique.com › en › codes › insert-image
Inserting a Base64 Image into an HTML Page
You can do this very simply by using the free base64 image converter on the site.
🌐
Reddit
reddit.com › r/webdev › displaying a base64 image from the address bar as html
r/webdev on Reddit: Displaying a BASE64 image from the address bar as HTML
December 28, 2021 -

Sorry if this doesn't make sense. I'm not a webdev and am learning as I go.

I found an app to convert a GIF into a BASE64 image, and can display that image directly in a browser from the address bar:

data:image/webp;base64,UklGRkoBAABXRUJQVlA4ID4BAABQGQCdASoAAQABPmk0mk0hkQj4FANAbuF0ZgEtoORb8gfQOSPZX+2EgESEaTOSPZ6DxKSajiULSzpGo4lJNDzXQeJSTUcK5r8qGlHjl2D9vhlNxaqqqqqqqqqoL6VDSjxy7B/jQpFZdgjdfIZuvkMxg0br5DN18hm6+QzdLRAHczR3KfRt3MFQHcsDcSANwYmceQBWXYI3XyGbpby08Bm6+QzdfIZuvb23VLW0APFyIwSGyg8MoGZ1CWupEZTcWqqqqqFAEjCoBJNQpYdi80ajiUIAAP7+Esv2C28v//g1vuG/VBMAAAAZ65KNgQJL55Z9Kf7wVb1kgNzlgIUCZkIXounFlBEEAAAAXasZLom8qUayYpxZQNd/OqdYmNk1M4YgqR+3YuyBsC8XmKKxMjcoxBenFECuAAAAAAAAAAA=

However, is there a way to either plug this into a <script> tag, or force something to read it as HTML? The particular instance would be plugging this in as an HTML address on an NFC card or QR code, so when that's scanned it just displays the BASE64 image in the browser as opposed to going to a website. If I just put that in an address field on either one of those media, the iPhone will say "no valid data" because it's looking for the https.

Then, if there is a way to do this, is there a way to resize it from that same syntax in the browser? Like, if it was a 128x128px image, is there syntax to tell the browser to display it at 600x600?

Thank you in advance!

🌐
Mozilla
developer.mozilla.org › en-US › docs › Web › URI › Reference › Schemes › data
data: URLs - URIs | MDN
1 month ago - The MIME type indicating the type of data, such as image/jpeg for a JPEG image file. If omitted, defaults to text/plain;charset=US-ASCII. You can find a full dissection of MIME type structure and a table of common MIME types on the web. ... Indicates that the data should be base64-decoded; see encoding data into base64 format.
🌐
Plotly
community.plotly.com › dash python
Create PNG from base64 encoded html.Img src - Dash Python - Plotly Community Forum
January 11, 2023 - Since some precomputation is required for the initial image to be created, it is saved as a local file temporarily to encode into a base64 string readable by the html.Img component: encoded = base64.b64encode(open('output-1.png', 'rb').read()) ...
🌐
Jaredwinick
jaredwinick.github.io › base64-image-viewer
Base64 Image Viewer
We cannot provide a description for this page right now
🌐
Base64 Image Encoder
base64-image.de › home › tutorial
Tutorial - Base64 Image Encoder
Base64 encoding converts binary image data into a text string that can be embedded directly into your HTML or CSS.
🌐
DebugBear
debugbear.com › blog › base64-data-urls-html-css
Page Speed: Avoid Large Base64 data URLs in HTML and CSS | DebugBear
April 15, 2026 - ... Run a website speed test to identify Base64 embedded in your code. Expand large requests and select the Size Analysis tab. To use a data URL as an img source in HTML, embed the Base64-encoded image directly in the src attribute of the <img> tag.
🌐
IDRSolutions
blog.idrsolutions.com › home › how to display base64 images in html (tutorial)
How to display base64 images in HTML (Tutorial)
August 28, 2025 - When creating HTML files you can display base64 images by several means using local images, external URLs, and by embedding the image as base64 content. This tutorial covers how you can display base64 images in HTML by embedding them.
🌐
Atlassian Community
community.atlassian.com › q&a › confluence › questions › using base64 embedded images in html
Using Base64 Embedded Images in HTML
March 1, 2021 - <img src="data&colon;image/png;base64,..."> If so, I have encountered the same bug. https://community.atlassian.com/t5/Confluence-discussions/WYSIWYG-editor-accepts-HTML-with-embedded-images-but-doesn-t/m-p/776355#M1716
🌐
MindStick
mindstick.com › articles › 336066 › how-to-display-base64-images-in-html
How to display Base64 images in HTML – MindStick
June 10, 2024 - To display a Base64 encoded image in HTML, you can use the img element by setting the src attribute to the Data URI that represents the Base64 encoded image data.
🌐
Googlecloudcommunity
security.googlecloudcommunity.com › home › security forums › google security operations › base64 images in html widget
Base64 Images in HTML Widget | Community
June 11, 2025 - Has anyone had any luck embedding base64 encoded png's in the alert view HTML widget?I'm setting a context value to "<img src="data&colon;image/png;base64, BASE64STRING>" but it's just rendering the name of the context value key.If I punch the ...
🌐
OutSystems
outsystems.com › forums › discussion › 34170 › html-tag-to-display-image-base-64
HTML tag to display image (Base 64) | OutSystems
February 15, 2018 - I am trying to display the image that was uploaded using upload widget · Outsystems doesn't have a default image preview option. so I am trying the following steps