Home Base64 to Text

Base64 to Text

Decode a Base64 string back to readable UTF-8 text — 100% in your browser.

Input

Output

What is Base64 to Text?

Base64 to Text is a tool that decodes a Base64 string back into the original plain text. Base64 is an encoding scheme that represents binary data using 64 printable ASCII characters, and decoding reverses the process: each group of four Base64 characters is turned back into three bytes of the original data. This tool then interprets those bytes as UTF-8 text, so the decoded result can include English, Chinese, Japanese, emoji and any other Unicode characters that were encoded.

Naive use of the built-in JavaScript atob() function only works for Latin-1 characters and garbles any multi-byte text. This tool first decodes the Base64 string to bytes and then decodes those bytes as UTF-8, which correctly restores Chinese characters, Japanese kana and kanji, emoji and other multi-byte characters. If a Base64 string is malformed, the tool reports a clear error instead of silently producing garbage.

How Base64 decoding works

Base64 decoding takes each group of four input characters and converts them back into three bytes. Each character is first mapped to a 6-bit value using the Base64 alphabet (A–Z, a–z, 0–9, "+", "/"), and the four 6-bit values are concatenated into 24 bits, which are then split into three 8-bit bytes. If the input contained "=" padding, the corresponding bytes at the end are discarded so the output length matches the original input.

After the bytes are recovered, they are interpreted as a UTF-8 character sequence. UTF-8 is a variable-length encoding: ASCII characters take one byte, Latin characters take two, common Chinese and Japanese characters take three, and less common characters and emoji take four. The decoder reconstructs the original text by reading these byte sequences, which is why a correct UTF-8-aware decoder is essential for non-English content.

When to use Base64 to Text

Decoding Base64 to text is needed whenever you encounter a Base64 string and want to read or reuse its contents. Common situations include:

  • Inspecting JWT tokens. The header and payload of a JSON Web Token are Base64URL-encoded; decoding them reveals the JSON claims such as issuer, subject and expiration.
  • Reading HTTP Basic Auth headers. The Authorization header contains a Base64-encoded "username:password" pair that you may want to inspect for debugging.
  • Debugging data URIs. Inline Base64 content in data: URLs can be decoded to verify what is actually being embedded.
  • Decoding email attachments (MIME). Binary attachments in email are Base64-encoded; decoding reconstructs the original file bytes.
  • Recovering text from configs or logs. Some systems store text values as Base64 in environment variables, secrets, or log files for safe transport.
  • Verifying encoded content. Quickly check that a Base64 string you generated actually decodes back to the expected text, especially after copying or transmission.

Whenever you need to turn a Base64 string back into readable text, this tool does it instantly and correctly handles UTF-8 content.

How to decode Base64 to text

Decoding Base64 with this tool takes a second and happens entirely in your browser. No upload, no sign-up, no installation. Follow these three steps:

  1. Paste the Base64 string. Click inside the input box on the left and paste the Base64 string you want to decode. Whitespace and newlines are tolerated.
  2. Click "Decode". The decoded text appears in the output box on the right, along with a small notice showing the input and output lengths. If the string is invalid, a clear error is shown.
  3. Copy or download. Click "Copy" to copy the decoded text to your clipboard, or "Download .txt" to save it as a text file. Click "Clear" to start over.

Because the decoding is computed locally with JavaScript on your own device, the Base64 string never leaves your browser. This makes the tool suitable for confidential tokens, credentials fragments, or sensitive configuration values.

Tips for working with Base64 decoding

If decoding fails, the most common cause is a malformed string. Check for missing or extra "=" padding, stray whitespace inside the string, or characters outside the Base64 alphabet. Note that URLs sometimes replace "+" with a space; if you copied a Base64 value from a URL query string, you may need to turn spaces back into "+" before decoding.

Watch out for the Base64URL variant, which replaces "+" with "-" and "/" with "_" and often drops the "=" padding. It is used in JWTs and URL-safe contexts. To decode a Base64URL string with a standard decoder, convert "-" back to "+", "_" back to "/", and add "=" padding until the length is a multiple of four. Finally, remember that Base64 is not encryption — anyone can decode it, so never treat it as a way to protect secrets.

Is this Base64 to Text tool free?

Yes, completely free with no sign-up, no watermarks and no limits beyond your device's memory.

Does it correctly decode Chinese, Japanese and emoji?

Yes. The tool decodes the Base64 bytes and then interprets them as UTF-8, so Chinese characters, Japanese kana and kanji, emoji and any other Unicode characters that were encoded are correctly restored.

Why does decoding fail on my string?

The most common reasons are missing "=" padding, characters outside the Base64 alphabet, or a Base64URL string that uses "-" and "_" instead of "+" and "/". Clean up the string or convert Base64URL characters back to the standard alphabet and try again.

Is my Base64 string uploaded?

No. All decoding is local. Your string never leaves your browser, so it is safe to paste confidential tokens and credentials.

Can I encode text back to Base64?

Yes. Use the companion Text to Base64 tool to encode any UTF-8 text into a Base64 string.