Runs in your browser. Your files and text never leave your device - nothing is uploaded.
Decode Base64 to Text Online
The Tools Kit’s free Base64 Decoder turns an encoded string back into the readable text it came from. Paste the Base64 and the decoded result appears as you type, read as UTF-8 so accented letters, non-Latin scripts and emoji survive the trip. If the input cannot be decoded to text, you get a clear “Invalid Base64 string” warning instead of garbled output.
Decoding happens entirely in your browser, so the value you paste is never uploaded. Need to go the other way? The Base64 encoder converts plain text into Base64, and the two together make it easy to check that a round trip is lossless.
How to Use the Base64 Decoder
- 1
Paste the Base64 string
Paste or type the encoded value into the Base64 Input box. Spaces and line breaks inside it are ignored, so a wrapped value copied from an email or log still works.
- 2
Read the decoded text
The Decoded Text panel updates as you type; there is no button to press. The bytes are read as UTF-8, so accented letters and emoji come back intact.
- 3
Fix the input if it is rejected
If you see "Invalid Base64 string", remove any data: URI prefix, convert URL-safe characters (- to + and _ to /), and check that the value is text rather than binary data.
- 4
Copy or clear
Click Copy Text to put the decoded result on your clipboard, or Clear to empty the input and start again.
There is no account to create and no limit on how many strings you decode.
How Base64 Decoding Works
Base64 represents data with 64 characters: A-Z stand for 0-25, a-z for 26-51, 0-9 for 52-61, + for 62 and / for 63. Each character carries 6 bits, so every group of four characters holds 24 bits, which is exactly three bytes. Decoding simply reverses that mapping.
Take TWFu. T is 19, W is 22, F is 5 and u is 46, which in binary are 010011, 010110, 000101 and 101110. Joined and split into 8-bit bytes, that gives 01001101, 01100001 and 01101110, or 77, 97 and 110: the ASCII codes for M, a and n. So TWFu decodes to “Man”.
When the original data is not a multiple of three bytes, the encoder pads the end with = signs.SGk= holds two bytes and decodes to “Hi”; a string ending in == holds one byte in its last group. This decoder treats padding as optional, so a value with the = signs stripped, as often happens in URLs and tokens, still decodes. As a rule of thumb, every 4 Base64 characters decode to 3 bytes, so 1,000 characters of Base64 come from about 750 bytes of original data. For a closer look at the individual bytes or bits, the binary converter shows text as 0s and 1s.
Why a Base64 String Shows as Invalid
The decoder accepts standard Base64 and is forgiving about spaces, line breaks and missing padding. These are the cases that still produce the “Invalid Base64 string” warning, and how to fix each one:
| Cause | Example | Fix |
|---|---|---|
| URL-safe characters | SGVsbG8- | Replace - with + and _ with / |
| Data URI prefix | data:text/plain;base64,SGk= | Paste only the part after the comma |
| Truncated value | SGVsb | Copy the full string; a length that leaves one extra character cannot be decoded |
| Stray characters | SGk=" or SG*k | Remove quotes, asterisks and other non-Base64 symbols |
| Binary data, not text | /w== (the single byte 0xFF) | The data is a file or raw bytes, which this text decoder cannot display |
The last case is worth knowing about: a string can be perfectly valid Base64 and still be rejected here, because the tool only outputs UTF-8 text. Images embedded as Base64 are a common example; the image to Base64 converter is the right tool on the encoding side for those, producing a ready-made data URI for HTML or CSS.
Base64 vs Other Encodings
Base64 is one of several ways to make data safe for text-only channels, and it is easy to mix them up. A string full of %20 and %3D sequences is percent-encoded, not Base64; run it through the URL decoder instead. Values made only of uppercase letters and the digits 2-7, such as authenticator secrets, are usually Base32, which the Base32 encoder and decoder handles. Text containing & or < uses HTML entities, which the HTML entity encoder converts back to characters.
None of these are encryption. Base64 has no key, and decoding it requires nothing more than this page, so it should never be used to protect passwords or personal data.
Common uses
- Reading a Base64 value found in a JSON response, log file or environment variable
- Checking what an HTTP Basic Authorization header contains (the part after “Basic ”)
- Inspecting the text inside a data: URI or a MIME email part
- Peeking at the JSON payload of a JWT after converting its URL-safe characters
- Verifying that text survives an encode and decode round trip unchanged
Decoded payloads are often minified JSON; paste them into the JSON formatter to read them comfortably. For more encoders, formatters and converters, browse all developer tools.
Base64 terms explained
| Term | What it means here |
|---|---|
| Base64 | A way to write any bytes using 64 printable characters: A-Z, a-z, 0-9, plus (+) and slash (/) |
| Padding (=) | One or two equals signs added at the end so the length is a multiple of 4; this decoder accepts strings with or without them |
| Base64url | A URL-safe variant that uses - and _ instead of + and /, common in JWTs; convert those two characters before decoding here |
| UTF-8 | The text encoding the decoded bytes are read as; it stores accented letters in 2 bytes and most emoji in 4 |
| Data URI | A value such as data:image/png;base64,... that embeds a file in HTML or CSS; only the part after the comma is Base64 |
| Sextet | A 6-bit group; each Base64 character stands for one sextet, so four characters carry 24 bits, or 3 bytes |
Frequently Asked Questions
Paste the string into the Base64 Input box. The decoder converts it back to bytes, reads those bytes as UTF-8 text and shows the result in the Decoded Text panel as you type. Click Copy Text to copy it. For example, TWFu decodes to Man and SGk= decodes to Hi.
Yes. It is free with no sign-up, and decoding runs entirely in your browser with JavaScript. The string you paste is not uploaded, stored or logged, so it is safe to inspect tokens, headers and config values.
The usual causes are URL-safe characters (- or _), a data: URI prefix left in front of the data, a stray character that is not part of the Base64 alphabet, a truncated string, or data that decodes to binary bytes that are not valid UTF-8 text, such as an image or a compressed file.
No. Strings with the trailing = or == padding removed still decode, so SGVsbG8sIFdvcmxkIQ gives the same Hello, World! as SGVsbG8sIFdvcmxkIQ==. A string whose length leaves a single leftover character is still rejected, because one character cannot hold a full byte.
Not directly. The decoder expects standard Base64, so a - or _ makes it report an invalid string. Replace every - with + and every _ with /, then paste it again. Padding does not need to be added back.
Yes. The decoded bytes are interpreted as UTF-8, so w6l0w6k= decodes to été and 8J+YgA== decodes to a grinning-face emoji. A plain atob call would show those as garbled Latin-1 characters instead.
No. The tool outputs text only, and Base64 that decodes to binary data such as a PNG, PDF or ZIP is almost always reported as an invalid string because the bytes are not valid UTF-8. There is no file download or image preview.
No. Spaces, tabs and line breaks anywhere in the input are ignored, so Base64 that has been wrapped at 64 or 76 characters per line, as in PEM files and MIME email, decodes without cleanup.
No. Base64 is an encoding, not encryption. It uses no key, and anyone can reverse it, which is exactly what this decoder does. Never rely on Base64 to hide passwords or other secrets.
A JWT has three dot-separated parts written in Base64url. You can paste the middle part here after converting - to + and _ to /, and it decodes to JSON. The JWT decoder splits the token and decodes the header and payload for you.
Reviewed by Raja Jahangir · Last reviewed: October 7, 2026
How do you decode a Base64 string?
To decode Base64, paste the encoded string into a decoder and the original bytes are restored and shown as UTF-8 text. Base64 uses A–Z, a–z, 0–9, plus and slash, often ending in one or two "=" padding characters, which are optional here. Decoding is not decryption, since Base64 provides no security.
