🔐

Base64 Encoder & Decoder

Encode and decode Base64 strings instantly

How Base64 Encoding Works

Base64 converts binary data into 64 printable ASCII characters:

  • A-Z (26 characters)
  • a-z (26 characters)
  • 0-9 (10 characters)
  • + and / (2 characters)
  • = for padding
Every 3 bytes of input becomes 4 characters of output, making Base64 approximately 33% larger than the original data.

Common Use Cases

Data URLs

``html `

HTTP Basic Authentication

` Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ= `

JSON Data Storage

When you need to store binary data in JSON, Base64 encoding allows safe text representation.

URL-Safe Base64

Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 replaces these with - and _`.

Frequently Asked Questions

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used to encode data that needs to be transmitted over media designed to handle text, such as embedding images in HTML or sending attachments in email.

Why do we use Base64?

Base64 ensures data integrity when transferring binary data over text-based protocols. It's used in data URLs, email attachments (MIME), storing complex data in JSON, and authentication headers (Basic Auth).

Does Base64 provide encryption?

No, Base64 is an encoding scheme, not encryption. Anyone can decode Base64 data. It's designed for data transport, not security. For sensitive data, use proper encryption like AES before Base64 encoding.

Related Tools

Explore other tools you might find useful:

Specialized Versions

Try our targeted calculators for specific use cases: