Base64 Encoder & Decoder

Encode and decode text using Base64 encoding - perfect for data transmission, embedding, and storage

Base64 Tool

Convert text to Base64 or decode Base64 to text

ENCODING

Examples

Click any example to load it into the tool

Simple Text

Click to load
Input: Hello, World!
Output: SGVsbG8sIFdvcmxkIQ==

JSON Data

Click to load
Input: {"name":"John","age":30}
Output: eyJuYW1lIjoiSm9obiIsImFnZSI6MzB9

URL

Click to load
Input: https://example.com/path?param=value
Output: aHR0cHM6Ly9leGFtcGxlLmNvbS9wYXRoP3BhcmFtPXZhbHVl

Email Content

Click to load
Input: Subject: Meeting Let's schedule a meeting for...
Output: U3ViamVjdDogTWVldGluZwpMZXQncyBzY2hlZHVsZSBhIG1lZX...

About Base64

Base64 is a binary-to-text encoding scheme that represents binary data in sequences of 24 bits that can be represented by four 6-bit Base64 digits.

Character Set:

A-Z, a-z, 0-9, +, /

Plus '=' for padding

Common Use Cases

Email Attachments

MIME encoding for binary files in emails

Web Development

Data URLs, embedding images in CSS/HTML

Data Storage

Storing binary data in text-based formats

Authentication

Basic HTTP authentication headers

Image Embedding

Inline images in JSON APIs and documents

History

1987

First defined in RFC 989 for Privacy-Enhanced Mail (PEM)

1993

Refined in RFC 1421 as part of PEM standard

1996

Adopted for MIME (RFC 2045) for email attachments

2006

Standardized in RFC 4648 as we know it today

Present

Widely used in web APIs, data URLs, and modern applications

Technical Details

Encoding Process:

  1. Convert input to binary
  2. Group into 24-bit chunks
  3. Split into four 6-bit groups
  4. Map to Base64 alphabet
  5. Add padding if needed

Size Overhead:

Base64 increases data size by ~33% due to encoding overhead

Variants:

  • Standard (RFC 4648)
  • URL-safe (- and _ instead of + and /)
  • Base64url (no padding)