Skip to main content

Encoding & Number Bases

Base64 Encoder and Decoder

Encode text to Base64 as UTF-8, or decode Base64 and Base64url to bytes and readable text. Check padding, strict mode, and line breaks.

Tool workspace

Your input stays in this browser.

The result updates after you stop typing.

Ready

You can run the tool again after any change.

Text is encoded as UTF-8 bytes, including Unicode and leading byte-order marks.

Options

Use A-Za-z0-9+/= for standard Base64 or A-Za-z0-9-_= for URL-safe Base64. Custom alphabets must contain 64 distinct symbols, with an optional padding symbol.

Ready for a result

Encode text to Base64 as UTF-8, or decode Base64 and Base64url to bytes and readable text. Check padding, strict mode, and line breaks.

This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.

Encoding reads UTF-8 text bytes. Decoding recovers the bytes represented by the selected alphabet.

Encoding returns Base64 text. Decoding returns decimal bytes with an optional text preview.

  • Encode accented or non-Latin text for a JSON field, data URI, or HTTP header that expects Base64.

Sources: RFC 4648: Base64 and canonical encoding

Encode café as UTF-8 Base64

Input: café

Settings: Encode, Alphabet Standard

Result: Y2Fmw6k=

UTF-8 stores é as two bytes. The encoder therefore reads five bytes for café.

Choose an alphabet and inspect decoded bytes

  1. Choose Encode or Decode.
  2. Set Alphabet for standard Base64 or Base64url.
  3. For decoding, choose whether to remove unexpected characters and whether to enforce Strict mode.
  • Removing unexpected characters can discard data from the wrong alphabet.
  • The text preview supports UTF-8, not arbitrary binary formats.
  • Base64 does not encrypt data.