Base64 Encode/Decode

Encode and decode text to/from Base64 with UTF-8 support and URL-safe variant.

URL-safe Base64
0 characters
0 characters
Result will appear here...

Base64 Encode/Decode

The Base64 Encoder/Decoder is a free online tool that converts text to and from Base64 encoding directly in your browser. It supports standard Base64 as well as URL-safe Base64 variant, handling UTF-8 characters correctly.

Real-time conversion updates as you type, with a convenient swap button to exchange input and output. All encoding and decoding is performed locally — no data is sent to any server, making it safe for sensitive data.

How it works

Base64 encoding converts binary data to a text representation using 64 ASCII characters (A-Z, a-z, 0-9, +, /). Each group of 3 bytes is converted to 4 Base64 characters. URL-safe variant replaces + with - and / with _, and removes padding (=).

Use cases

  • Encoding binary data for embedding in JSON, XML, or HTML
  • Decoding Base64-encoded API responses and tokens
  • Converting data URIs for images and files
  • Working with email attachments encoded in Base64 (MIME)
  • Encoding credentials for HTTP Basic Authentication headers

Related Calculators