Base64 Encode & Decode

Encode and decode Base64 strings with UTF-8 support.

Mode

What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that represents binary data as a string of printable ASCII characters. It uses a 64-character alphabet (A-Z, a-z, 0-9, +, and /) plus an equals sign for padding. Originally designed to safely transmit binary data over text-based protocols like email (MIME) and HTTP, Base64 encoding is now used everywhere in web development, from embedding images in CSS and HTML via data URIs to encoding authentication tokens and cryptographic keys. Our free online Base64 encoder and decoder runs entirely in your browser using the built-in btoa() and atob() JavaScript functions, so your data never leaves your device. This makes it safe for encoding sensitive strings like API keys, JWTs, and credentials.

When to Use Base64 Encode & Decode

Base64 conversion comes up frequently in everyday development work. Common use cases include:

  • Encoding images, fonts, or small files as data URIs for inline embedding in HTML or CSS
  • Decoding JWT (JSON Web Token) payloads to inspect claims and expiration times during debugging
  • Preparing binary data for inclusion in JSON payloads or XML documents that only support text
  • Encoding HTTP Basic Authentication credentials (username:password) before adding them to request headers
  • Converting certificate files or cryptographic keys into a transport-safe text format
  • Decoding Base64 strings received from APIs to inspect their original content

How It Works

Enter your plain text or Base64-encoded string and choose the direction (encode or decode). The tool processes your input instantly in the browser, converting text to its Base64 representation or reversing the process to reveal the original content. For encoding, each group of three bytes is mapped to four Base64 characters; for decoding, the reverse mapping is applied. The result is displayed immediately and can be copied with a single click. All processing happens client-side with zero server interaction, no account creation, and no data storage. Your sensitive tokens and credentials stay on your machine at all times.