Base64 Decoder
Paste Base64, get text or a downloadable binary. Auto-detects content type.
How it works
Base64 decoding reverses the encoding process, turning the 64-character ASCII representation back into the original bytes. This tool decodes the string entirely in your browser and then inspects the result to determine whether it is human-readable text or a binary blob like an image or PDF.
If the decoded bytes form valid UTF-8 text, the content is displayed inline so you can read and copy it. If the bytes contain non-text data — a PNG header, a PDF signature, a ZIP archive — the tool detects the file type by its magic bytes and offers a download button with the correct file extension. This auto-detection saves you from guessing whether the encoded payload is text or binary.
The entire operation happens locally using the browser's built-in atob function and typed arrays. No data is transmitted to any server. Base64 strings can contain sensitive information — API keys, session tokens, certificate data — and a privacy-first decoder ensures that sensitive payload stays on your machine.
FAQ
How do I know if decoded data is text or a file?
The decoder inspects the raw bytes after decoding. If all bytes are valid UTF-8 and contain no control characters (except newlines and tabs), it renders as text. Otherwise, it identifies the file type by magic bytes and offers a download.
Can I decode Base64URL (URL-safe Base64)?
Yes. The decoder normalizes - to + and _ to / and re-adds padding before decoding, so both standard Base64 and Base64URL work.
Why does my Base64 string fail to decode?
The most common causes are trailing whitespace, line breaks inserted by email clients, or an incomplete string (length not divisible by 4 before padding). The error message will indicate the position of the invalid character.
Is there a size limit?
The decoder runs in your browser's memory. Strings up to tens of megabytes decode fine on modern devices. For very large payloads, use the Bytario API which handles streaming decoding.