Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 to text instantly

Use this free Base64 encoder and Base64 decoder to convert text to Base64 or decode Base64 back to readable text. Supports UTF-8 characters including emojis. 100% client-side — your data never leaves your browser.

Advertisement

Base64 Quick Reference

Base64 Alphabet

A-Z26 uppercase letters
a-z26 lowercase letters
0-910 digits
+Plus sign
/Forward slash
=Padding character

Common Use Cases

EmailMIME attachments
WebData URIs for images
APIsBinary data in JSON
AuthBasic authentication
StorageCookies, localStorage
Advertisement

Base64 Encoding Guide

What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that converts binary data into a string of ASCII characters. It uses 64 printable characters to represent binary data, making it safe for transmission over text-based protocols that might otherwise corrupt binary data.

The name "Base64" comes from the fact that it uses a 64-character alphabet. Each Base64 character represents exactly 6 bits of data, so 4 Base64 characters encode 3 bytes (24 bits) of original data.

How Base64 Encoding Works

The encoding process follows these steps:

  • Convert to binary: The input data is converted to its binary representation (sequence of 0s and 1s).
  • Split into 6-bit groups: The binary data is divided into groups of 6 bits each.
  • Map to characters: Each 6-bit group (values 0-63) is mapped to a character from the Base64 alphabet.
  • Add padding: If the input length isn't divisible by 3, padding characters (=) are added to make the output length divisible by 4.

When to Use Base64

  • Email attachments: MIME encoding uses Base64 to embed binary files in emails.
  • Data URIs: Embed images directly in HTML/CSS without separate file requests.
  • API payloads: Safely include binary data in JSON or XML documents.
  • Basic authentication: HTTP Basic Auth encodes credentials in Base64.
  • Storing binary in text: Databases or config files that only support text.

Base64 is NOT Encryption

A common misconception is that Base64 provides security. It does not. Base64 is an encoding scheme, not encryption. Anyone can decode Base64 data instantly — it provides zero security.

Never use Base64 to "hide" sensitive information like passwords, API keys, or personal data. If you need to protect data, use proper encryption algorithms like AES or RSA.

Base64 Encoder & Decoder FAQ

What is Base64 encoding?

Base64 encoding converts binary data into ASCII text using 64 printable characters. It's used to safely transmit binary data over text-based systems like email, HTTP, and JSON. The Base64 alphabet includes A-Z, a-z, 0-9, +, and /.

How do I encode text to Base64?

Select the Encode tab above, type or paste your text in the input area, and click the Encode button. The Base64-encoded result appears instantly. Click Copy to copy it to your clipboard.

How do I decode Base64 to text?

Select the Decode tab, paste your Base64 string in the input area, and click Decode. The original text will appear in the output. If the input is invalid Base64, you'll see an error message.

Is my data safe with this tool?

Yes, completely safe. This Base64 encoder runs entirely in your browser using JavaScript. Your data is never sent to any server. All encoding and decoding happens locally on your device.

Does this support emojis and special characters?

Yes! This tool fully supports UTF-8 encoding, which means it handles emojis, accented characters, Chinese, Japanese, Arabic, and all other Unicode characters correctly.

Why does Base64 make data larger?

Base64 increases data size by approximately 33%. This is because every 3 bytes of binary data become 4 Base64 characters. The tradeoff is that the data becomes safe to transmit over text-only systems.

Is Base64 the same as encryption?

No! Base64 is encoding, not encryption. It provides zero security — anyone can decode it instantly. Never use Base64 to protect sensitive data. Use proper encryption (AES, RSA) for security.

What does the = padding mean?

The = character is padding. Base64 output must be divisible by 4 characters. If the original data doesn't produce enough characters, = signs are added at the end (0, 1, or 2 padding characters).

Advertisement