Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 back to text. Supports UTF-8, JSON, HTML, and binary. 100% client-side.

How to Use

1

Paste

Enter text to encode or a Base64 string to decode.

2

Convert

Results appear instantly as you type. Toggle between Encode and Decode modes.

3

Copy

Copy the result to clipboard. Use Swap to move output back to input.

What is Base64?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters: A-Z, a-z, 0-9, +, and /, with = used for padding. It was designed to transmit binary data through text-only systems like email (MIME), JSON, XML, and URLs.

Every 3 bytes of input produce 4 Base64 characters, resulting in a 33% size increase. This trade-off is the cost of representing binary as safe ASCII text. Base64 is not encryption — it provides no security. Anyone can decode it.

Common Use Cases

  • Email attachments — MIME uses Base64 to encode binary files inside text-based email messages.
  • Data URIs — embed images directly in HTML/CSS as data:image/png;base64,... without separate HTTP requests.
  • API authentication — HTTP Basic Auth sends username:password as Base64 in the Authorization header.
  • JSON payloads — transmit binary data (images, PDFs, certificates) inside JSON API responses.
  • JWT tokens — JSON Web Tokens use Base64url encoding for the header and payload sections.

Frequently Asked Questions

No. Base64 is encoding, not encryption. It transforms data into a different representation but provides zero security. Anyone can decode it instantly. Never use Base64 to protect passwords, API keys, or sensitive data.
Base64 uses 64 characters (6 bits each) to represent 8-bit bytes. Three bytes (24 bits) are encoded as four Base64 characters (24 bits). So 3 input bytes produce 4 output characters — a 4/3 = 33% increase. Plus optional line breaks and padding.
Yes. 100% free, no signup, runs entirely in your browser. No data is sent to any server. Works offline after page load.

Related Tools

Request a Feature

0 / 2000