You find a Base64 string in a JWT, a log line, an email header, or a config file, and you need to know what it says. This tool decodes it on the spot, entirely in your browser: paste the string, and the decoded text appears live as you type. There is no server round trip, no upload, and no stored history — the input never leaves your device, which matters when the string is a session token, a credential, or customer data.
Decoding is where most Base64 tools fall apart, because real-world input is messy. Strings arrive from email clients that hard-wrap lines every 76 characters, from JWTs that dropped the padding, from URL parameters where plus signs became spaces, and from systems that emit the URL-safe alphabet with minus and underscore instead of plus and slash. This page accepts all of those variants: it tolerates whitespace anywhere in the input, fixes missing equals-sign padding automatically, and understands both the standard and URL-safe character sets, so the paste button works instead of throwing an error at the first obstacle.
The output side gets equal care. Results are decoded as UTF-8, so emoji, Chinese characters, and accented letters emerge correctly instead of as mojibake, and a small stats line reports the decoded size in both characters and bytes — useful when the decoded payload is destined for something size-limited, like an HTTP header.
How Decoding Works Under the Hood
Decoding reverses the encoding arithmetic. Each character of the input maps back to a value from 0 to 63 — A is 0, B is 1, through Z at 25, then a through z at 26 to 51, digits 0 through 9 at 52 to 61, plus sign at 62, and forward slash at 63. Four characters therefore carry 24 bits of data, which regroup into 3 bytes. A worked example: the string TWFu decodes to the word Man. T is 19, W is 22, F is 5, and u is 46; in 6-bit binary that is 010011, 010110, 000101, 101110, reassembled into bytes 01001101, 01100001, 01101110 — decimal 77, 97, 110, exactly the UTF-8 bytes of the letters M, a, and n.
Padding behaves symmetrically. When the original data had 1 leftover byte, the encoder produced two data characters followed by two equals signs, and the decoder recovers 1 byte from them; 2 leftover bytes produce three characters and one equals sign, recovering 2 bytes. This is why the padding fixes matter so much in practice: a truncated copy that lost its trailing equals signs still contains all the data characters, and reconstructing the padding is just arithmetic on the string length — the tool appends one or two equals signs until the length divides by 4, then decodes normally.
How to Use This Tool (Step by Step)
- Paste the Base64 string into the input. Decoding happens live on every keystroke — no submit button.
- Do not bother cleaning the input first: line breaks, spaces, and tabs are stripped automatically, which rescues strings copied out of wrapped emails and multi-line log entries.
- Read the decoded output on the right. UTF-8 is assumed, so international text and emoji display as themselves.
- Check the stats line for character and byte counts of the result if the output has a size constraint downstream.
- If the string fails to decode, the error names the actual problem — an invalid character, usually — rather than silently producing garbage.
Common Decode Errors and What Causes Them
Most failed decodes trace back to one of a handful of causes, each with a telltale signature:
- Invalid character in the middle of the string. Quotes, commas, colons, or Unicode lookalike characters picked up from surrounding prose when copying. The fix is trimming the paste to just the token — JSON often wraps values in quotes that ride along into the clipboard.
- Length not a multiple of 4. The classic JWT symptom: standard libraries strip the equals padding. This tool re-pads automatically, but if you are debugging why another tool failed, this is the reason nine times out of ten.
- Plus signs turned into spaces. This happens when a Base64 string traveled through a URL query parameter or an HTML form without proper encoding — the plus is the escaped form of a space. If the result looks almost right but breaks at random spots, search the input for spaces in place of plus signs and restore them.
- Valid decode, gibberish output. The string decoded cleanly into bytes, but those bytes were never UTF-8 text. Decoding an image or a zip file this way produces symbol soup — binary content needs a binary tool, and the stats line showing byte counts without readable text is the giveaway.
- Empty output. An empty input technically decodes to an empty string; it usually means the paste never landed or you selected the wrong clipboard entry.
Decoding Real-World Formats
Three formats account for most decoding sessions. First, JWT segments: a token shaped like header.payload.signature has three Base64URL pieces between dots. Paste the middle segment here to read the claims — the exp timestamp, the subject, the scopes. Remember the payload is signed, not encrypted; reading it is exactly what anyone with the token can do, which is why secrets must never be placed inside one. URL-safe characters and missing padding, both handled here, are the norm for JWTs.
Second, HTTP Basic authentication headers, which decode the Authorization value into username:password form — handy for debugging an API client, and simultaneously a reminder that Basic auth is only safe over HTTPS because the credentials are this trivially readable. Third, Data URIs and embedded payloads: the segment after base64, in strings like data:image/png;base64, contains binary data, not text. Decoding it as text yields noise; that job belongs to a file-oriented converter, though decoding a data:application/json or data:text/plain payload works fine here.
Standard Versus URL-Safe Input
| Position | Standard alphabet | URL-safe alphabet |
|---|---|---|
| Value 62 | plus sign | minus sign |
| Value 63 | forward slash | underscore |
| Padding | equals signs kept | usually omitted |
| Typical source | email, classic tooling | JWTs, web APIs, identifiers |
This tool accepts either alphabet, and mixed input too — useful when a string has been hand-edited. The two alphabets encode identical bytes; only two characters differ, so detection is not even required. If a decoded result is plausible but contains odd substitutions, check whether the source system used the URL-safe variant and your copy step mixed conventions.
Tips and Best Practices
- Trust but verify: after decoding something important, glance at the byte count — a payload claiming to be JSON but measuring a few hundred bytes may be an error page, not the data you expected.
- Never decode a token you did not expect to receive; a Base64 blob in an unexpected email is a common phishing attachment trick, though decoding itself cannot execute anything.
- For repeated work with the same long input, use the swap button to move the decoded output back into the input field and re-encode it — round-trip equality confirms the decode was faithful.
- Remember the decode is local: passwords, tokens, and API keys in Base64 can be decoded here without transmitting them anywhere.
- When sharing decoded findings in tickets, include the byte count alongside the text; it tells the next reader whether the payload was complete.