When to use Base64 images
Use Base64 for tiny icons, placeholders, single-file demos, offline documents, snippets, and small assets that must travel inside HTML, CSS, JSON, or XML.
Local files stay in-browser. URL conversion uses your browser to fetch the remote image and may be blocked by CORS.
Tip: You can also press Ctrl/Cmd + V to paste an image from your clipboard.
Use Base64 for tiny icons, placeholders, single-file demos, offline documents, snippets, and small assets that must travel inside HTML, CSS, JSON, or XML.
A normal image URL is usually better for large photos, frequently reused assets, cacheable files, responsive images, and content that should load progressively.
Base64 adds roughly 33 percent before prefixes or markup. Large inline strings bloat HTML/CSS, delay parsing, reduce cache reuse, and can make editors sluggish.
Base64 is reversible text encoding. It does not encrypt, hide, or protect an image from users who can view the page source or network response.
Raw Base64 is only the encoded bytes. A Data URI adds the MIME type and prefix, such as data:image/png;base64,, so browsers know how to display it.
Small SVGs can be shorter and easier to edit as URL-encoded data:image/svg+xml text instead of Base64, especially for simple icons.
Check that the Data URI prefix is present, the MIME type matches the image, line breaks were not inserted in an unsafe place, and the receiving app allows Data URIs.
Local file uploads and clipboard images are converted in your browser and are not uploaded to Starlight Tools. URL conversion fetches the remote image through your browser, so the remote host sees that request and browser CORS rules may block it.
The tool is built for PNG, JPG/JPEG, GIF, WebP, SVG, ICO, and BMP. HEIC and AVIF may work only in browsers that can decode those formats.
There is no upload limit for local files because conversion happens in your browser, but Base64 becomes large quickly. For reliable copy/paste and page performance, keep embedded assets under about 100 KB when possible and avoid multi-megabyte outputs.
Yes. Use the file picker, drag and drop, paste, or a URL that your browser is allowed to fetch. SVG, ICO, and BMP support depends on browser decoding for preview and optional optimization.
Some email clients support Data URI images, but support is inconsistent. Many production email templates still use hosted images or CID attachments for better reliability.
Gmail commonly strips or refuses inline Data URI images in message bodies, so Base64 images are usually not reliable for Gmail campaigns or signatures.
This tool's wrap control is visual only, so it makes very long strings easier to inspect without changing the copied value. If another editor inserts real line breaks, remove them before pasting into attributes, JSON strings, CSS declarations, or code.
Modern browsers handle long Data URIs better than older ones, but very large inline images can still hit browser, editor, CMS, or email-client limits. Use external image files for large assets.
Browsers and operating systems can reject huge clipboard writes or make the page slow while selecting the text. Download the output as a text file when the string is very large.
Yes. A Base64 image can be decoded back into binary image bytes as long as the Base64 string is complete and uses the correct MIME type when displayed.
No. Base64 is an encoding, not compression or encryption. It usually makes image data about 33 percent larger before any Data URI prefix, line wrapping, or surrounding markup.