Base64 Decoder
A preset of Base64 Encoder & Decoder
Decode Base64 back into readable text. Handles Unicode correctly and accepts both standard Base64 and the URL-safe variant used by JWTs, so you can paste a token segment directly.
- Files never leave your device
- Free, no signup
- No watermarks
- Works offline once loaded
How to base64 encoder & decoder
- 1
Choose a direction
Switch between Encode and Decode.
- 2
Enter your data
Type or paste into the input box. Conversion happens as you type.
- 3
Copy the result
Copy the output, or download it as a text file.
Why decoding needs to accept both Base64 variants
A Base64 string encountered in the wild might be standard Base64 — from an email attachment, a data URI, a config file — or Base64URL, most commonly from one of the three dot-separated segments of a JWT. Since the two variants differ only in three characters, a decoder that insists on exactly one form forces you to manually swap `-` for `+` and `_` for `/` before it will accept a token segment, which is a fiddly extra step for something that should be a single paste. Accepting both variants means a JWT payload segment can be pasted directly, without first knowing or caring which variant of Base64 it happens to be.
When decoded output is not readable text
Not everything encoded in Base64 is text to begin with — images, encryption keys, and other binary data are also commonly Base64-encoded for exactly the same text-safety reasons. Decoding one of those produces raw bytes that display as garbled, unreadable characters when interpreted as text, which is expected rather than a sign the decoding failed: the operation reversed the encoding correctly, but the underlying bytes were never meant to be read as UTF-8 text in the first place.
A quick way to sanity-check a suspicious string
Pasting an unfamiliar Base64-looking string here and checking whether it decodes to something legible is a fast first step when investigating what a piece of data actually is — a config value, a cookie, a token fragment found somewhere unexpected. A string that decodes cleanly to readable JSON or plain text confirms it really is Base64-encoded data; one that produces garbage on decoding is either not Base64 at all, or is Base64-encoded binary data rather than text, either of which narrows down what to investigate next.
Frequently asked questions
Does this handle emoji and non-English text?
Yes. Text is encoded as UTF-8 before Base64, which is what makes accents, Chinese characters and emoji round-trip correctly. Tools built on the browser's raw `btoa` throw an error on any character above U+00FF — a very common bug.
What is Base64URL and when do I need it?
A variant that replaces `+` with `-` and `/` with `_`, and drops the `=` padding, so the result is safe inside a URL or filename. JSON Web Tokens use it. Standard Base64 breaks when pasted into a query string.
Is Base64 a form of encryption?
No. It is an encoding designed to carry binary data through text-only channels, and anyone can reverse it instantly. Never use it to hide passwords, keys or personal data.
Why is my Base64 output larger than the input?
Base64 represents every three bytes as four characters, so the output is always about 33% larger. That overhead is the price of being safe to transmit as text.
You might also need
JWT Decoder
Decode and inspect JSON Web Tokens
JSON Formatter
Format, validate and minify JSON instantly
CSS Formatter
Beautify or minify stylesheets
CSS Minifier
Shrink stylesheets with a real CSS-aware minifier
Hash Generator
MD5, SHA-1, SHA-256, SHA-384 and SHA-512
HTML Formatter
Beautify and indent HTML properly
JavaScript Formatter
Format JS and TypeScript with a real parser
JS Minifier
Shrink JavaScript with real minification, not regex