Base64 encoder and decoder

Encode Unicode text as standard Base64 or decode standard Base64 back to text.

Inputs stay in your browser

Interactive tool

Enable JavaScript to use the interactive controls. The guide below is available without JavaScript.

The Base64 tool converts text to UTF-8 bytes before standard Base64 encoding and reverses that process during decoding. Base64 is designed to represent bytes with printable characters; it is not a security mechanism.

When to use this tool

  • Encode a short Unicode text value for a text-only field.
  • Decode a standard Base64 string to inspect its UTF-8 text.

How to use

  1. Enter text for Encode or a Base64 string for Decode.
  2. Choose the direction; switching modes can reuse the valid output.
  3. Review and copy the local result.

Example

Unicode text

Encoding Hello 世界 first converts the characters to UTF-8 bytes, then produces a standard padded Base64 string.

How it works

  • UTF-8 conversion is performed with TextEncoder and TextDecoder; the Base64 alphabet and padding follow the standard browser btoa/atob representation.

Limits and notes

  • Base64 is an encoding, not encryption; anyone with a decoder can recover the content.
  • The tool implements strictly padded standard Base64, not the Base64url alphabet used in some URLs and tokens.
  • Decoded bytes must form valid UTF-8 text; arbitrary binary data is rejected.

Frequently asked questions

Why is the Base64 output longer?

Base64 represents each 3 input bytes with 4 printable characters, plus possible padding.

Can Base64 protect a password?

No. It provides no confidentiality and must not be treated as encryption.

Does it support Chinese text?

Yes. Text is converted to UTF-8 bytes before encoding and decoded back with UTF-8.

References

Related tools

Send tool feedback

The message includes page context only, never tool input or results.

Send tool feedback