Base64 Encode / Decode

Encode and decode Base64 strings online. Supports text and UTF-8 content.


What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that converts binary data into a safe ASCII string format. Developers use Base64 encoding daily — from embedding images in HTML and CSS to transmitting binary data through text-only protocols like email (MIME) and JSON APIs.

Our free online Base64 encoder and decoder processes your data instantly in the browser. No data is sent to a server, making it safe for encoding sensitive content like API tokens, certificates, or authentication credentials.

Base64 works by taking every 3 bytes of input and converting them into 4 ASCII characters from a set of 64 characters (A-Z, a-z, 0-9, +, /). This means encoded data is about 33% larger than the original, which is a small price for universal text compatibility.

How to Use This Base64 Tool

  1. Enter your text in the input area
  2. Click “Encode →” to convert plain text to Base64
  3. Or paste Base64 text and click "← Decode" to convert back to plain text
  4. Click “Copy” to copy the result to your clipboard
  5. Click “Clear” to reset both fields

Common Use Cases

  • Embedding images in CSS/HTML — Convert small images to Base64 data URIs to reduce HTTP requests
  • Encoding API authentication — HTTP Basic Auth requires Base64-encoded username:password strings
  • Email attachments — MIME encoding uses Base64 to transmit binary files over text-based email protocols
  • Data URIs — Embed fonts, SVGs, or small files directly in web pages
  • JWT tokens — The header and payload sections of JWTs are Base64URL-encoded

Frequently Asked Questions

Is Base64 encryption?

No. Base64 is encoding, not encryption. It provides no security — anyone can decode a Base64 string. If you need to protect data, use proper encryption (AES, RSA) before optionally Base64-encoding the result for transport.

What’s the difference between Base64 and Base64URL?

Standard Base64 uses + and / characters, which can cause issues in URLs. Base64URL replaces them with - and _, making the output safe for use in URLs and filenames.

Why does Base64 make data larger?

Base64 converts 3 bytes into 4 characters, resulting in roughly 33% size increase. This overhead is the trade-off for guaranteed text-safe transmission.