Base64 Encode / Decode

LOCAL · IN-BROWSER

Encode and decode Base64 strings instantly in your browser. UTF-8 safe.

Advertisement728 × 90
Plain text
0 chars · 0 B
Base64
Advertisement728 × 90

About Base64 Encode / Decode

Convert any text or string to Base64 encoding, or decode a Base64 string back to plain text. Handles Unicode and UTF-8 characters correctly. Commonly used to encode binary data for JSON payloads, HTTP headers, and email attachments. Runs 100% client-side — safe to paste tokens, credentials, or sensitive strings.

All processing happens entirely in your browser using modern web APIs. Nothing is uploaded to our servers — your data stays local and private. Free to use forever.

Common use cases

  • Encoding API credentials for HTTP Basic Authentication headers
  • Embedding small images or fonts as Base64 data URIs in CSS/HTML
  • Decoding JWT payloads and email MIME parts
  • Encoding binary data to safely transmit in JSON or XML
  • Debugging Base64-encoded values from logs or API responses

How it works

For encoding, the tool uses encodeURIComponent + btoa to correctly handle UTF-8 characters beyond ASCII. For decoding, it reverses the process with atob + decodeURIComponent. This ensures emoji, accented characters, and CJK characters all round-trip correctly — a common failure point in naive btoa() implementations.

LearnJWT decoded: structure, claims, and security pitfalls