Home › Unit Converters › Base64 Decoder Online
Base64 Decoder Online
Decode base64 back to plain text with this free base64 decoder online — or flip it round and encode text into base64. Paste your string, get the result instantly, and copy it with one click. Everything runs in your browser, so nothing you paste is ever uploaded anywhere.
| Input length | 20 characters |
| Output length | 13 characters |
| Output size | 13 bytes |
Tip: spaces and line breaks in pasted base64 are ignored. If the padding (= signs) is missing, the tool adds it for you when it can.
How it works
Base64 exists because not every system can handle every kind of data. An email, a web address, or a settings file is plain text, and raw binary data — or text with unusual characters — can break it. Base64 solves that by rewriting any data using just 64 safe characters: capital and small letters, the digits 0 to 9, plus and slash, with equals signs as padding at the end. The result is a little longer than the original — about a third longer — but it can travel anywhere text can go, and decoding it gives back the original exactly.
To decode, paste the base64 string into the box and press Decode — or just paste, since the tool also decodes live as you type. The tool first tidies the input: spaces, line breaks, and other whitespace copied by accident are removed, and missing padding is added when the length allows it. Then it checks that every remaining character belongs to the base64 alphabet. If something is wrong — a dash where a plus should be, a character that base64 never uses, or a length that cannot be fixed with padding — you get a plain-English error message instead of a blank result or a crash.
Encoding works the other way round. Switch to "Encode text → base64", type or paste any text, and the tool produces its base64 form. Accented letters, symbols, and non-English characters all work, because the tool converts the text to its proper byte form first — the older shortcuts that only handled plain English letters would corrupt them. The Copy result button puts the output on your clipboard in one click, and Swap direction flips the tool around so you can check your work: encode a sentence, swap, and decode it back to prove the round trip is exact.
One thing base64 is not: secret. It is an encoding, not encryption — the difference matters. Encoding changes how data looks; encryption changes who can read it. Anyone who sees a base64 string can decode it in a second, so never treat it as a way to hide a password, a token, or anything private. What it is good for is transport: embedding a small piece of data in a text file, passing a token through a web address, or reading the payload of a data file to see what it actually contains. And because the decoding happens entirely in your browser, the text you paste never leaves your device — which is exactly how a decoding tool should behave.
Worked example
Decode the base64 string SGVsbG8sIFdvcmxkIQ== step by step.
Step 1: Check the string. It is 20 characters long, a multiple of 4, and every character is a letter, a digit, or an equals sign — so it is well-formed base64.
Step 2: The two equals signs at the end are padding, which tells us the last group of characters stands for fewer than 3 bytes.
Step 3: Each group of 4 base64 characters decodes to 3 bytes of text. Reading the groups through: SGVs → "Hel", bG8s → "lo,", IFdv → " Wo", cmxk → "rld", IQ== → "!".
Step 4: Put the pieces together: "Hello, World!" — 13 characters.
The tool shows the same result: Hello, World!, with 20 input characters and 13 bytes of output underneath. To check the reverse, switch to "Encode text → base64", type "Hello, World!", and the tool returns SGVsbG8sIFdvcmxkIQ== — the exact string you started with.
FAQ
What is base64 encoding?
Base64 is a way of writing binary data using only 64 safe text characters: the letters A to Z and a to z, the digits 0 to 9, plus, and slash, with equals signs as padding at the end. It lets data travel through systems that only handle plain text, such as email and web addresses. Decoding turns that text back into the original data — in this tool, back into readable text.
Is base64 the same as encryption?
No. Base64 is only a different way of writing the same data, like writing a word in a different alphabet — anyone can decode it in a second. It hides nothing and protects nothing. Never use base64 to store a password or anything secret; use real encryption for that.
Why does my base64 string fail to decode?
The usual reasons are characters that are not part of base64, such as spaces, line breaks, or dashes copied from a web page, and missing padding — a valid base64 string has a length that is a multiple of four, with up to two equals signs at the end. This tool ignores spaces and line breaks for you and adds missing padding where it can, and it tells you plainly when the input still is not valid base64.
Can I encode text to base64 with this tool too?
Yes. Switch the mode to Encode text → base64, type or paste your text, and the tool produces the base64 version right away, with a copy button to take it elsewhere. It handles accented letters and other non-English characters correctly, so the text comes back exactly as you typed it when it is decoded again.
Is my text sent to a server when I decode it?
No. The decoding runs entirely in your browser on your own device, and nothing you type or paste leaves the page. That matters because base64 is often used for tokens and pieces of data you would not want to share — decoding locally means your text stays yours.