Image Base-64
Encode, decode image base-64 online.
Encode an image as a data URI, or decode a PNG/JPEG/WebP/GIF/BMP image data URI. SVG data-URI decoding is rejected for safety.
What this tool does
Represent an image as a data URL for embedding. The result exposes the original bytes to anyone who receives it.
How to use it
- If supplying content as a file, select one source file (image/png,image/jpeg,image/webp,image/gif,image/svg+xml,image/bmp).
- Set mode to one of: encode, decode.
- Set text / content.
- Choose Process, inspect the result, then use the download control. A reported error means no successful output was produced.
Limits and result checks
Encode an image as a data URI, or decode a PNG/JPEG/WebP/GIF/BMP image data URI. SVG data-URI decoding is rejected for safety.
Common questions
Which mode settings affect image to base 64?
Mode: choose encode, decode. Encode an image as a data URI, or decode a PNG/JPEG/WebP/GIF/BMP image data URI. SVG data-URI decoding is rejected for safety.
Where can I read the data-handling details for Image Base-64?
Inputs are processed in browser memory and are not uploaded by this plugin. Generated downloads remain on your device. The site privacy policy explains memory cleanup and hosting logs.
File processing and privacy · Report a problem
Why an image becomes text
Base64 turns a picture file into a long string of ordinary characters. That sounds like vandalism until you meet the systems that need it: a web page that embeds a small icon directly in its HTML or CSS so no separate file loads, an API that accepts images only inside JSON, an email template that carries its graphics inside itself, a database field that stores an image as text. The image is not compressed or altered — it is re-spelled, so it can travel through text-only doors and be restored exactly at the other end.
The cost, and when it is worth paying
The re-spelling inflates the data by about a third, and the browser must decode it before displaying. That arithmetic decides the use cases. For small graphics — icons, logos, a signature — embedding is often a net win: one less file for the page to fetch. For photographs and large images it is a net loss that grows with every kilobyte, which is why real photo galleries are never built this way. Rule of thumb: if the image is small enough that its Base64 string does not scare you, embedding is reasonable; if the string runs to pages, serve the file.
Can Base64 be turned back into the image?
Yes, exactly — decoding restores the identical file, byte for byte. Nothing about the picture is lost in either direction, which is why the format is trusted for transport and storage in text systems.
Is Base64 a way to hide or protect an image?
No. It is a public encoding with free decoders everywhere; anyone holding the string holds the image. Use it to move pictures through text systems, never to keep them secret.
Why is my Base64 string so long?
Because every three bytes of image become four characters of text, and images are thousands to millions of bytes. Length is the format working as designed — and a useful signal: very long strings mean the image should probably travel as a file instead.