Base64 Decoder
Paste Base64 or a data URI to see the image, play the audio or read the text, download the file, or encode text to Base64.
Last checked
Paste Base64 or a data URI
Spaces and line breaks are ignored, URL-safe characters (- and _) and missing padding are accepted. Everything is decoded in this tab.
The decoded file shows here: an image preview, an audio player or the text, with a download.
- Base64 to image, with a preview and download
- Detects PNG, JPEG, GIF, WebP, SVG, PDF, ZIP, MP3 and more
- Base64 to text, as UTF-8
- Accepts data URIs, URL-safe Base64 and missing padding
How to use it
- Paste the Base64 text or the whole data URI.
- Read what it is. An image shows as a preview, audio plays, text appears, anything else shows its first bytes.
- Download the file, or switch to Encode text or a file to turn text or a file into Base64.
What it checks and why
Base64 writes binary data using 64 printable characters, so a file can travel inside text such as JSON, an email or a web page. Decoding reverses that. A data URI adds a prefix that names the file type, like data:image/png;base64, and then the data.
The decoder cleans the input first: it drops the prefix, removes spaces and line breaks, turns the URL-safe characters - and _ back into + and /, and adds the missing = padding. Then it looks at the first bytes of the result. Every common format starts with a fixed signature, so the tool can tell a PNG from a JPEG or a PDF even when the prefix is missing or wrong.
Text is decoded as UTF-8 by default; switch to Latin-1 or UTF-16 LE for text saved by older Windows tools. If the bytes are not valid text, you see a hex dump of the first bytes instead, which is usually enough to recognise what the data is. The encoder works the other way and handles accents and emoji, because it converts text to UTF-8 bytes first.
Specs and sources
Limits
- The file type is read from the first bytes, so a rare format may show as plain binary.
- Very large inputs, many megabytes of text, are slow to paste and decode.
- Decoding is not decryption. Base64 hides nothing, and anyone can read what it holds.
Questions
- How do I convert Base64 to an image?
- Paste the Base64 text or the full data URI. If the data is an image, the tool shows a preview and a download button, and it picks the right extension from the file signature.
- Why does my Base64 string fail to decode?
- The usual causes are a character that is not Base64, such as a stray symbol, a cut-off string, or text around the data. Quotes, CSS url(...) and src="..." around a data URI are removed for you. For anything else the tool names the first bad character and its position.
- What is URL-safe Base64?
- A variant that uses - and _ in place of + and /, and often drops the = padding, so the text can sit in a URL or a JWT. The decoder accepts both forms, and the encoder can write either.
- Is Base64 a form of encryption?
- No. It only changes how data is written. Anyone can decode it, so never use it to protect a secret.