Privacy: All encoding and decoding happens entirely in your browser. No data is sent to any server.
Key Features
Encode & Decode
Quickly encode text to Base64 or decode Base64 strings back to readable text. Switch between modes with a single click.
File Support
Encode files up to 10MB directly to Base64. Drag and drop or click to upload. Perfect for creating data URIs for images.
Multiple Formats
Get instant conversions to 8 different formats: Base64, Base64 URL-safe, hex, binary, ASCII, URL encoding, Base32, and Unicode.
Auto-Detection
In decode mode, automatically detects the input format (Base64, hex, binary, etc.) and converts it correctly.
100% Private
All encoding and decoding happens in your browser. Your data never leaves your device - nothing is sent to servers.
Fast & Easy
Copy any format with one click, download results, or use the try sample button to see the tool in action instantly.
Understanding Base64 Encoding
Base64 is a method of encoding binary data as text using a specific set of 64 ASCII characters. It is widely used in web development, email systems, and data transmission.
How It Works
Base64 encoding converts data in three steps:
- Divide the input data into groups of 3 bytes (24 bits)
- Split each 24-bit group into four 6-bit segments
- Convert each 6-bit value (0-63) to a Base64 character
Padding characters (=) are added if the input length is not divisible by 3.
Character Set
Base64 uses 64 specific characters:
- • A-Z (uppercase letters, values 0-25)
- • a-z (lowercase letters, values 26-51)
- • 0-9 (digits, values 52-61)
- • + (plus sign, value 62)
- • / (forward slash, value 63)
- • = (padding character)
Common Use Cases
- • Embedding images in HTML/CSS (data URIs)
- • Email attachments (MIME encoding)
- • JSON Web Tokens (JWT)
- • API authentication (Basic Auth)
- • Storing binary data in text databases
- • URL parameters and cookies
Advantages & Limitations
Advantages:
- • Text-safe for any transmission medium
- • Human-readable (can be copied/pasted)
- • Widely supported across platforms
Limitations:
- • Increases data size by ~33%
- • Not suitable for large files in memory
- • Not encryption (easily decoded)
Supported Encoding Formats
Base64 Standard
Uses A-Z, a-z, 0-9, +, / characters with = padding. The most common encoding format.
Base64 URL-Safe
Replaces + with -, / with _, and removes padding. Safe for URLs and filenames without encoding.
Hexadecimal
Each byte represented as two hexadecimal digits (0-9, A-F). Commonly used in color codes and low-level programming.
Binary
Each byte represented as eight binary digits (0 or 1). Shows the raw binary representation of data.
Base32
Uses A-Z and 2-7 characters. More human-readable than Base64, commonly used in TOTP authentication codes.
Practical Examples
1. Embedding Images in HTML
Encode an image to Base64 and embed it directly in your HTML using a data URI:
<img src="data:image/png;base64,iVBORw0KG..." alt="Logo" />Benefits: No separate HTTP request, works offline, useful for small images and icons.
2. HTTP Basic Authentication
Username and password are combined with a colon and Base64 encoded:
3. JSON Web Tokens (JWT)
JWTs use Base64 URL-safe encoding for header and payload:
Each section (header.payload.signature) is Base64 URL-safe encoded JSON.
Frequently Asked Questions
Find answers to common questions
Need Developer Tools for Your Team?
We offer custom developer tools, API development, and technical consulting services for businesses of all sizes.