Developer tools

Base64 encoder and decoder

Encode text or binary to Base64, or decode Base64 strings. Supports URL-safe mode, line breaks and data URI generation.

  • Free, no sign-up
  • No data stored
  • Reviewed 2026-01-15

Your details

Direction

Results

About the Base64 Encoder/Decoder

Encode any text to Base64 or decode a Base64 string back to plain text. Options include URL-safe alphabet (replacing + and / with - and _), line breaks every 76 characters (MIME) and data URI prefix generation for embedding in CSS or HTML.

How to use the Base64 Encoder/Decoder

  1. Paste input text or Base64 string.
  2. Choose direction: encode or decode.
  3. Enable URL-safe mode if needed.
  4. Optionally generate a data URI.
  5. Copy the result.

Frequently asked questions

Why does Base64 make data larger?

Base64 encodes 3 bytes into 4 characters, increasing size by ~33%. The trade-off is safe transport through text-only channels.

What is URL-safe Base64?

Standard Base64 uses + and / which have special meaning in URLs. URL-safe mode replaces them with - and _ (RFC 4648).

Can I encode images?

If you have the raw binary, yes. For convenience, use the data URI option with the correct MIME type (e.g. image/png).