← Tools
Encoding

Base64 Encoder / Decoder

Convert text to Base64 and back. Supports Unicode and URL-safe mode. Everything runs in your browser — nothing leaves your device.

Plain Text0 chars
Base640 chars

About Base64

Base64 is a binary-to-text encoding scheme that represents binary data as ASCII characters using a 64-character alphabet (A–Z, a–z, 0–9, +, /). Three input bytes are packed into four output characters, making the encoded string roughly 33% larger than the original.

The URL-safe variant replaces + with - and / with _, and omits padding (=) so the result is safe to use directly in URLs and filenames without percent-encoding.

Common Use Cases

  • Data URIs — embed images or fonts directly in HTML/CSS. Try the Image to Base64 converter.
  • Email (MIME) — encode binary attachments for text-based transport
  • JSON APIs — send binary data in JSON payloads
  • HTTP Auth — Basic Authentication encodes credentials as Base64
  • JWT tokens — header and payload are Base64url-encoded. Decode them with the JWT Debugger.
  • Database storage — store binary blobs in text columns
  • Read more: Base64 Encoding: A Complete Developer Guide

Tips

  • Base64 is encoding, not encryption — anyone can decode it
  • Use URL-safe mode for tokens, query params, or file names
  • Encoded output is always ~33% larger than the input
  • This tool supports full Unicode (emoji, CJK, accents)
  • No data is sent to any server — conversion is 100% local

Frequently Asked Questions

Is Base64 the same as encryption?

No. Base64 is reversible encoding with no secret key — it makes binary data printable, not private. Use proper encryption (AES, RSA) when you need security.

Why does Base64 output end with = or ==?

Padding characters ensure the output length is always a multiple of 4. One = means the input had 2 remaining bytes; == means 1 remaining byte.

What is URL-safe Base64?

Standard Base64 uses + and / which have special meaning in URLs. URL-safe mode replaces them with - and _, and usually omits padding.

Can I encode images with this tool?

This tool encodes text. To encode binary files like images, use the Image to Base64 tool instead.