Base64 to Image
Decode Base64 input to an image.

Base64 to Image is a free tool that decodes Base64 input and returns the embedded image.
What problem does Base64 solve?
Base64 to Image accepts text characters that represent binary image data, allowing an image to pass through systems designed primarily for text. An image is normally a sequence of bytes, and some email formats, configuration files, APIs, and text fields cannot carry those bytes directly.
In input for Base64 to Image, Base64 processes image data in groups of three bytes and represents each group with four ASCII characters. As a result, for sufficiently large inputs, encoded data is commonly about one-third larger than the original bytes, while padding can produce much greater proportional overhead for very short inputs.
A small text example shows the transformation. The same process can be applied to image bytes.
Before encoding
Cat
After Base64 encoding
Q2F0
A Base64 image is encoded, not encrypted. Anyone who has the encoded image value can use Base64 to Image or another decoder to recover it, so it provides no secrecy or access control. Do not treat a Base64 image as protected merely because it is unreadable at a glance.

Which Base64 form belongs in the input?
The correct form depends on where the image value came from. Standard Base64 uses uppercase and lowercase letters, numbers, plus signs, forward slashes, and equals signs for required padding when the input length is not divisible by three; this padding may be omitted only when the referring specification explicitly permits it. Base64URL replaces the plus and slash characters with hyphen and underscore, making the value easier to place in a URL.
- Raw Base64 payload contains only the encoded data, such as a long value beginning with characters like iVBOR for many PNG files.
- Data URL includes a media type and base64 flag before the payload, as in data:image/png;base64,iVBOR...
- Base64URL may appear in query parameters, tokens, or APIs that use a URL-safe alphabet.
- MIME-wrapped Base64 may contain line breaks inserted by an email system.
When preparing input for Base64 to Image, if a source value starts with a data URL prefix, the Base64 payload begins after the comma. The accepted wrapper formats for this tool are not specified, so use the encoded payload itself if the complete data URL is rejected. Do not replace hyphens and underscores unless you have confirmed that the source uses Base64URL.
Turning encoded image data back into image bytes
Provide the Base64 representation of the image as the input. The tool processes it on the server and returns an Image result.
- Copy the complete encoded value from its source without omitting characters at the beginning or end.
- Identify whether it is raw Base64, a data URL, or a URL-safe variant.
- If necessary, remove a data URL prefix while keeping everything after the comma.
- Decode the value and inspect the returned image.

For example, a value shaped like data:image/png;base64,iVBOR... contains a PNG media type and a base64 flag followed by encoded PNG bytes. After Base64 decoding, those bytes can be interpreted as the original PNG image. Decoding reconstructs the bytes. It does not sharpen the picture, change its dimensions, or convert it to a different image format.
The alphabet can contain numbers, but arbitrary spaces, punctuation, accented letters, and non-Latin characters are not part of canonical Base64. Empty Base64 input represents no bytes and therefore cannot contain an image. Very large images also produce long encoded values because of the format's size overhead.
What should you check when the result is unreadable?
Check the alphabet, padding, whether the payload was encoded more than once, and the underlying file type when Base64 fails to produce a usable image. A decoder can successfully return bytes even when those bytes are not an image.
- Missing padding can cause strict decoders to reject a value. Standard Base64 commonly ends with one or two equals signs when the final byte group is incomplete, although some systems omit them when a referring specification explicitly permits it.
- Double encoding means the Base64 text itself was encoded a second time. One decode then produces another Base64-looking value rather than image bytes.
- Truncated input may decode partially or fail because a database field, log viewer, or copied message omitted the end.
- Wrong alphabet may be an issue if the payload uses characters that differ between the alphabets or its source specifies Base64URL. Check whether Base64URL data was handled as standard Base64, or the reverse, and look for hyphens and underscores instead of plus signs and slashes.
- Binary data that is not an image may decode correctly but appear as gibberish in a text viewer or fail when treated as a picture. Use Base64 decoder when you need to inspect a non-image payload.
Base64 to Image cannot restore image bytes that were removed or altered before decoding. If the value has been corrupted, obtain the original payload again rather than guessing at missing characters.
Base64 images in real systems
Base64 image data appears when software needs to place binary content inside a text-oriented container. Common examples include embedded data URLs in HTML or CSS, image fields in JSON API payloads, MIME email attachments, and configuration records that cannot store a separate binary file.
Query strings sometimes carry Base64URL values, but percent encoding may still be needed when standard Base64 is placed directly in a URL. Under IDNA, applicable non-ASCII domain labels are represented as A-labels whose xn-- payload is produced with Punycode rather than Base64. Both solve a text-transport problem, but they are not interchangeable.
Embedding an image can simplify a self-contained document or API message, but the larger encoded size can make JSON, logs, and source files harder to inspect. For web pages, a normal image file is often easier to cache and update. If you need the reverse operation for an existing file, Image to Base64 converts image bytes into an encoded value.
Common questions about Base64 images
Can Base64 image data contain line breaks?
Yes, some MIME and email formats wrap Base64 across multiple lines. Many decoders ignore ASCII whitespace, while strict implementations reject it, so remove transport-added line breaks if decoding fails.
Should I use Base64URL inside a CSS data URL?
Standard Base64 is the conventional form after the ;base64 flag in a data URL. Use Base64URL only when the receiving format explicitly calls for its hyphen-and-underscore alphabet.
Is confidential image data processed only in my browser?
No. This tool does the work on the server, so the input travels to the server over HTTPS. The input is not stored, but Base64 itself does not provide confidentiality.
Does Base64 remove location or camera metadata from a photo?
No. Base64 represents all supplied file bytes, which may include EXIF location, capture time, device details, or other metadata. Check and remove sensitive metadata before sharing the decoded image if the original file may contain it.
Similar tools
Popular tools
Create a WhatsApp chat link from a phone number, with an optional prefilled message.