Free Tool
Base64 Decoder
Paste Base64 text below and this tool decodes it back to plain text, in your browser. The tool is simple on purpose: decoding Base64 takes one click and no key, which is exactly the lesson — Base64 is encoding, not encryption, and anything encoded in it is readable by anyone.
Base64 is encoding, not encryption. If you can decode it here in one click, so can anyone else. Never treat Base64 output as secret, and never store sensitive data in Base64 thinking it is protected.
What this tool does
Base64 is a way of writing binary data as ordinary text, so it can travel through systems that only handle text. Email attachments, web tokens and data URLs all use it. The encoding uses a 64-character alphabet and adds equals-sign padding at the end, and it is completely reversible: the same steps that encode the data, run backwards, decode it. There is no key, no password and no secret involved at any point.
This decoder takes Base64 text — pasted from anywhere, or from the encoder on this site — and turns it back into the original text, in your browser. It handles the UTF-8 decoding too, so accented characters and emoji come back correctly. If the input is not valid Base64, the tool tells you so instead of guessing, and explains what is wrong:bad characters, missing padding, or a length that is not a multiple of four.
The decoder is the companion to the lesson on the encoder page: encode something, decode it here, and you have proved to yourself that Base64 hides nothing. That ten-second experiment is worth more than a paragraph of explanation, and it is the reason both tools exist as a pair on this site.
Try it
Paste Base64 text and decode it. Try the example first, then paste output from the Base64 encoder.
Waiting. Press Decode from Base64. If the input is not valid Base64, the tool will say so.
How it works
Decoding reverses the encoding exactly. The decoder reads the input in groups of four characters, converts each character back to its 6-bit value, and recombines them into three bytes. Equals signs at the end tell it that the last group held fewer than three bytes, so it knows how many to output. The result is a sequence of bytes, which the decoder then interprets as UTF-8 text — the same encoding the encoder used, so the round trip is exact.
This page uses your browser's built-in atob function for the Base64 step and TextDecoder for the UTF-8 step, both standard and tested. That means the result matches every other correct Base64 tool, and it means the decoder can tell you precisely when the input is invalid: atob throws an error on characters outside the alphabet or on a length that is not a multiple of four, and the page catches that error and explains it instead of failing silently.
Whitespace in the input is stripped before decoding, because Base64 is often copied with line breaks — email, for example, wraps it at 76 characters. But the decoder is strict about the alphabet itself: a character that is not in the Base64 set is an error, not something to guess around, because guessing would produce wrong output silently.
Limitations
The decoder handles text encoded as UTF-8. Base64 that represents other binary data — an image, a file, a certificate — will decode to bytes that are not readable text, and this page cannot display them meaningfully. It also handles the standard Base64 alphabet; the URL-safe variant, which uses minus and underscore instead of plus and slash, needs those characters converted first.
- Invalid input produces an error message, not a partial decode. That is deliberate: a wrong decode is worse than no decode.
- The decoder does not check whether the decoded text is sensible. Base64 can encode anything, including text that is itself encoded or encrypted — decoding it only reveals the next layer.
- Nothing you paste is sent anywhere. The computation is local, and the page works offline once loaded.
Examples
Example 1 — SGVsbG8sIHdvcmxk. Decoding SGVsbG8sIHdvcmxk gives Hello, world. That is the output of the encoder on this site for the same text, and the round trip proves the encoding is reversible by anyone with a decoder — which is everyone.
Example 2 — QQ==. Decoding QQ== gives A. The two equals signs are padding, telling the decoder that the last group held one byte instead of three. Padding is part of the format, and a decoder that ignores it would produce the wrong length.
Example 3 — invalid input. Paste Hello, world! into the decoder — plain text with spaces and an exclamation mark, not Base64. The tool refuses it and explains why: the characters are outside the Base64 alphabet. That strictness is a feature, because a decoder that guesses would silently produce garbage.
Frequently asked questions
Is Base64 encryption?
No. Base64 is encoding — a change of representation with no key and no secret. Anyone can decode it, as this page demonstrates in one click. It protects nothing.
Why does decoding fail on some text?
Usually because the input is not valid Base64: characters outside the alphabet, a length that is not a multiple of four, or missing padding. The decoder reports the problem instead of guessing.
What do the equals signs at the end mean?
Padding. Base64 works in groups of three bytes, and when the input does not divide evenly, equals signs fill the last group. They tell the decoder how many bytes the last group really held.
Can Base64 decode to something that is not text?
Yes. Base64 can encode any binary data — images, files, certificates — and decoding those gives bytes, not readable text. This page is for text encoded as UTF-8.
What is URL-safe Base64?
A variant that uses minus and underscore instead of plus and slash, so the output is safe in a web address. Convert those two characters back first, and the standard decoder works.