Developer

Base64 Encoder/Decoder

Encode text to Base64 or decode Base64 back to text.

Tool workspace
Loading Base64 Encoder/Decoder…

About Base64 Encoder/Decoder

Base64 Encoder/Decoder converts text into standard Base64 or reads Base64 back as UTF-8 text. It is useful when a development example, configuration value or message carries text in an encoded representation and you want to inspect or prepare it. Select Encode or Decode, paste the input and review the automatically generated result.

Base64 is an encoding, not encryption: anyone with the encoded value can attempt to decode it. This tool supports text rather than binary file uploads, and it does not handle an entire data URL or a JWT’s Base64url format automatically. Copy the result or download it as a text file when it matches the format expected by the receiving application.

How to use Base64 Encoder/Decoder

  1. Choose the direction

    Select Encode for plain text or Decode for a standard Base64 string.

  2. Paste the value

    Use the Text or Base64 field. Output updates automatically.

  3. Review text or errors

    Check the result. In Decode mode, invalid Base64 can produce an error.

  4. Save the output

    Use Copy or Download .txt when the result is ready.

Example: A small text sample

In Encode mode, the UTF-8 text Hello becomes SGVsbG8=. Switch to Decode and paste that string to recover Hello.

Input

Hello

Output

SGVsbG8=

How it works

For encoding, a TextEncoder first turns the input into UTF-8 bytes. Those bytes are passed to the browser’s Base64 encoder, which represents binary data with printable characters from the standard Base64 alphabet. The output can include padding characters such as =. For decoding, the browser reads the Base64 representation into bytes and a UTF-8 TextDecoder converts those bytes into a string.

The text conversion is important: plain browser byte encoders cannot directly represent every Unicode character, but the UTF-8 step allows ordinary multilingual text to be encoded. On decoding, this implementation allows replacement characters for bytes that are not valid UTF-8. It is therefore not a binary-file recovery tool: an arbitrary image or archive encoded as Base64 will not become a useful file through the text output. Standard Base64 also differs from the URL-safe alphabet used in many tokens.

When is this useful?

  • Inspect encoded text in a development sample.
  • Prepare a standard Base64 text value for a configuration.
  • Check a UTF-8 text round trip with a small sample.

Things to know

  • Encoding does not hide a value from someone who can decode it.
  • This is a text utility, not a binary file encoder or downloader.
  • Base64url characters and data-URL prefixes are not automatically normalized; use the relevant format-specific tool.

Privacy & processing

UTF-8 conversion and Base64 encoding or decoding happen in this browser. The text is not uploaded to a ToolMyth processing server. Copy and download are browser actions.

Frequently asked questions

Is Base64 a way to encrypt a password?

No. It is a reversible representation of data and requires no secret key to decode.

Can I encode non-English text?

Yes. Encode mode converts text to UTF-8 before producing Base64.

Why do I see replacement characters after decoding?

The decoded bytes may not be valid UTF-8 text. This tool displays text rather than reconstructing arbitrary binary files.

Can I paste a complete JWT here?

Not as one Base64 value. A JWT has separate Base64url sections; use JWT Decoder to inspect its header and payload.

Learn more