Encode text to Base64 or decode Base64 strings instantly. 100% free, no registration required, works right in your browser.
Instant encoding and decoding with no lag. See results as you type.
All conversions happen locally in your browser. Your data never leaves your computer.
Easily copy encoded or decoded results with a single click.
Paste your text in the "Encode" section or Base64 string in the "Decode" section.
Click "Encode to Base64" or "Decode from Base64" button to process your input.
View the result and copy it to your clipboard with the Copy button.
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It uses 64 characters (A-Z, a-z, 0-9, +, /) to encode data, making it safe for transmission across text-only channels.
| Use Case | Purpose | Example |
|---|---|---|
| Email Attachments | Encode binary data for email transmission | Images, PDFs in email bodies |
| JSON/XML Data | Embed binary content in text-based formats | Inline images in API responses |
| URL Parameters | Safe transmission of binary data in URLs | API authentication tokens |
| Data URIs | Embed images directly in HTML/CSS | Inline SVG or raster images |
| API Communication | Transport binary data over HTTP | File uploads and downloads |
Base64 uses the following 64 characters for encoding:
| Character Range | Value | Example |
|---|---|---|
| A-Z | 0-25 | A=0, B=1, Z=25 |
| a-z | 26-51 | a=26, b=27, z=51 |
| 0-9 | 52-61 | 0=52, 5=57, 9=61 |
| +/= | 62-64 (padding) | +=62, /=63, ==padding |
Base64 encoding converts binary data into text using the following steps:
| Step | Process | Example |
|---|---|---|
| 1. Convert to Binary | Convert each character to 8-bit binary | "A" = 01000001 |
| 2. Group Bits | Group bits into 6-bit chunks | 010000 01xxxx |
| 3. Add Padding | Pad with zeros if necessary | 010000 010000 |
| 4. Map to Characters | Convert each 6-bit value to Base64 character | QQ== |
MIME encoding for binary attachments in emails
Basic auth credentials in HTTP headers
Inline images as data URIs in HTML/CSS
Binary data in JSON and XML payloads
Storing binary data in text databases
Safe transmission of binary data in URLs
| Advantage | Benefit | Use Case |
|---|---|---|
| Text-Safe | Safe for email and text protocols | Email attachments, plain text transmission |
| Universal Support | Works in all programming languages | Cross-platform data exchange |
| Human-Readable | Readable ASCII characters | Debugging and inspection |
| No Special Characters | Avoids problematic characters | Legacy system compatibility |
| Reversible | Lossless encoding/decoding | Data integrity preservation |
There are several Base64 variants for different purposes:
Uses +/ characters, typical usage
Uses -_ instead of +/, for URLs
RFC 4648 variant without padding
With line wrapping for email
Works in all modern browsers with JavaScript support:
Your privacy is our priority. All encoding and decoding happens locally in your browser using JavaScript's built-in atob() and btoa() functions. No data is sent to our servers, and nothing is stored or transmitted.
Make sure the string contains only valid Base64 characters (A-Z, a-z, 0-9, +, /, =)
Verify the string is properly padded (should be multiple of 4 characters)
Ensure your text uses UTF-8 encoding for proper conversion
While our Base64 converter is optimized for simplicity and speed, you might also consider:
For URL-safe encoding of special characters
For formatting JSON data with embedded Base64
For text processing and formatting tasks
Convert between binary data and safe, ASCII-friendly text so you can move files, credentials, and payloads through emails, JSON, or logs without corruption.
Transforms any text or binary content into Base64 for text-only channels and decodes it back with no data loss.
Quickly jump to related encoding and developer utilities without leaving the page.
Important: This tool is provided as-is for personal and commercial use. Base64 encoding is NOT encryption and should not be used for security purposes. For sensitive data, use proper encryption methods.