Base64 Encoding / Decoding

Encode or decode text using Base64 encoding

About this tool

Base64 rewrites arbitrary bytes as 64 printable ASCII characters so binary or non-Latin data can travel safely through systems that only expect text: email bodies, JSON fields, HTTP headers, data URIs and query parameters.

This tool encodes and decodes with UTF-8, so accented characters, Cyrillic, CJK text and emoji survive a round trip. That matters because the browser's older helpers silently mangle anything outside Latin-1.

When to use it

  • Embedding a small image, font or icon in CSS as a data: URI
  • Carrying a JSON or binary payload through a header or query parameter that must stay ASCII
  • Looking at what an authentication token, JWT segment or API key actually contains
  • Decoding a certificate, attachment or log line that arrived Base64-encoded

Worked example

Input

héllo wörld

Output

aMOpbGxvIHfDtnJsZA==

Because the text is encoded as UTF-8, the result matches `printf 'héllo wörld' | base64` on Linux and macOS.

Frequently asked questions

Is Base64 encryption?

No. Base64 is an encoding, not encryption, and anyone can decode it without a key. Never use it to protect a secret — its only job is to make binary data safe to store or transmit as text.

Why is the Base64 output longer than the input?

Every 3 bytes become 4 characters, so the encoded text is roughly 33% larger. Trailing = characters pad the final group when the input length is not a multiple of three.

Does this tool upload the text I paste?

No. Encoding and decoding happen entirely in your browser; the text never leaves your device.

Related tools