Base64 Encoder / Decoder

Turn text or files into Base64, or turn Base64 back into text. Supports standard and URL-safe Base64. Nothing you paste is saved or shared.

Base64 Output
Format
Input: 0 chars
Output: 0 chars
Ratio: —

Base64 Encoder / Decoder: How It Works

Base64 is a standard way of turning files and special characters into plain, safe text. This encoder and decoder helps you read login tokens, put images into web pages or share complex text without it getting garbled.

Why Base64 Matters

When transferring data over protocols designed to deal purely with text (like HTML, CSS, or basic HTTP), binary data can easily become corrupted. Base64 encodes 8-bit bytes into a 6-bit alphabet (A-Z, a-z, 0-9, +, /). URL-Safe Base64 modifies the symbols to avoid breaking URI parsers.

Live Decoding and Encoding

Whether you are reading a login token, checking an email attachment or embedding a small image, the two-way view gives you an instant conversion without any setup.

Understanding Base64 Encoding and Decoding

Base64 is a binary-to-text encoding scheme that represents binary data (like images, files, or arbitrary bytes) using only 64 printable ASCII characters. It's commonly used to embed binary data inside text-based formats like JSON, XML, email (MIME), or HTML — for example, a small image embedded directly in a stylesheet using a data URI.

A standard data URI looks like data:image/png;base64,iVBORw0KGgo... — the MIME type tells the browser how to interpret the following Base64-encoded bytes. There's also a URL-safe variant of Base64 that replaces the '+' and '/' characters (which have special meaning in URLs) with '-' and '_' so encoded data can be safely used inside a URL or filename.

  • Not Encryption: Base64 is an encoding, not encryption — anyone can decode it instantly. Never use it to protect sensitive data.
  • ~33% Size Increase: Base64-encoded data is roughly a third larger than the original binary, since it maps 3 bytes to 4 characters.
  • URL-Safe Variant: Use the URL-safe alphabet when embedding encoded data in URLs, filenames, or query parameters.
Expert Answers

Frequently Asked Questions

Top questions about the Base64 Encoder / Decoder.

No. Base64 only changes how data is written; it is not encryption and offers no protection. Anyone can turn a Base64 string back into the original text.
Standard Base64 uses the '+' and '/' characters, which have special meanings in URLs. URL-Safe Base64 replaces them with '-' and '_' respectively to safely pass the string as a query parameter.
Yes. A JSON Web Token (JWT) comprises three Base64 encoded segments. You can paste the middle segment to instantly decode and view the JSON payload.