Base64 Encoder/Decoder
Paste a Base64 string below and this base64 decode tool converts it back to readable text, or encode plain text into Base64 for an API call or a data URI.
About
About Base64 Encoder/Decoder
Base64 takes binary data and represents it using only 64 safe ASCII characters, A through Z, a through z, 0 through 9, plus + and /, so it can travel through systems built for text without getting mangled. A base64 decode reverses that back into the original bytes, and this base64 encoder decoder handles the conversion both ways right in your browser.
The encoding works by grouping the original data into chunks of 3 bytes, 24 bits, and splitting those into four 6-bit groups, each mapped to one of the 64 characters. When the input doesn't divide evenly into 3-byte chunks, the output gets padded with one or two = signs at the end, which is why you'll often see Base64 strings ending in = or ==.
This 6-bit-to-character mapping is also why Base64 always makes data bigger, roughly 33% bigger than the original, since 3 bytes of real data become 4 bytes of encoded text. It's a fine tradeoff for small tokens and short strings, but it's not something you'd want to use to encode a large file.
Paste your text or Base64 string, pick encode or decode, and the result shows up instantly with a copy button next to it. Decoding automatically strips out any stray whitespace or line breaks that sometimes get introduced when a long Base64 string is copied from an email client or a terminal.
A JWT is actually three Base64url-encoded parts joined by dots, the header, payload, and signature, so this tool is handy for peeking at what's inside a token's payload without needing a dedicated JWT library. Everything stays local, which matters when the string you're decoding has an auth token or an API secret sitting inside it.
FAQ
Frequently asked questions
Is Base64 a form of encryption?
No, and this is probably the most common misconception about it. Base64 is purely a format conversion with zero security value, anyone can decode it back to the original in seconds, so it should never be relied on to hide a password or secret.
Why does a Base64 string sometimes end in one or two equals signs?
Those are padding characters, added when the original data's length isn't a multiple of 3 bytes. One = means the last group was short by one byte, two == means it was short by two.
What's the difference between standard Base64 and Base64url?
Standard Base64 uses + and / as two of its 64 characters, both of which have special meaning in a URL. Base64url swaps those for - and _ instead, so the encoded string can be used safely inside a URL or a filename without extra encoding.
Why does my decoded output look like garbled symbols?
You're probably decoding binary data, like an embedded image or a compiled file, and viewing it as if it were text. That's expected behavior, the bytes are correct, they just were never meant to be interpreted as readable characters in the first place.
Can I see what's inside a JWT using this tool?
Yes, informally. Paste the middle section of a JWT, the payload, between the two dots, and decoding it as Base64url will show you the claims inside, though this tool doesn't verify the token's signature.
Does encoding something in Base64 make it take up more storage space?
Yes, by roughly a third. That overhead is why Base64 is typically reserved for small payloads like tokens, keys, or small embedded images rather than large files.
Related tools
View all developer tools →URL Encoder/Decoder
Encode or decode URLs in strict or loose mode.
Open toolHash Generator (MD5/SHA-256)
Generate MD5, SHA-1 and SHA-256 hashes from text or files on your device.
Open toolJWT Decoder
Decode a JWT to read its header, payload, claims and expiry.
Open toolUUID/GUID Generator
Generate v4 UUIDs or GUIDs in bulk, in the format you prefer.
Open tool