Base64 Encode & Decode
Appliance Location: The Food Processor Two-Way ConversionHow to Encode and Decode Base64
Converting text to Base64 and back is simple with our online tool:
- Select Mode: Choose "Encode to Base64" or "Decode from Base64" using the toggle buttons above.
- Enter Data: Type or paste your text into the input panel. You can also upload a file for encoding.
- Configure Options: Toggle URL-safe mode, line breaks, or strict validation as needed.
- Copy or Download: Click "Copy" to copy the result or "Download" to save as a file.
Why Use Base64 Encoding?
Base64 encoding is essential for many modern applications. It converts binary data (images, files, credentials) into text that can be safely transmitted over text-based protocols:
- Email Attachments (MIME): Email protocols only support text. Base64 encodes binary attachments for transmission.
- Data URIs: Embed images directly in HTML/CSS using "data:image/png;base64,..." format.
- Basic Authentication: Encode "username:password" strings for HTTP Basic Auth headers.
- API Keys & Tokens: Store and transmit binary tokens as safe text strings.
- JSON Web Tokens (JWT): JWT uses Base64Url encoding for header and payload sections.
- Database Storage: Store binary data in text-based database columns.
How Base64 Encoding Works
Base64 converts every 3 bytes (24 bits) of input into 4 ASCII characters (6 bits each). The encoding uses a 64-character alphabet: A-Z, a-z, 0-9, +, and /. When input length isn't divisible by 3, padding (=) is added. This results in approximately 33% size increase compared to the original binary data.
URL-Safe Base64
Standard Base64 uses '+' and '/' characters which have special meanings in URLs. URL-safe Base64 replaces '+' with '-' and '/' with '_', making the encoded string safe for use in URLs, query parameters, and filenames. This variant is used in JWT tokens and many web APIs.
Privacy-First Client-Side Processing
Your privacy is our priority. All Base64 encoding and decoding happens locally in your browser using JavaScript's btoa() and atob() functions. Your data never leaves your device — no server uploads, no data storage, no third-party access. This makes our converter ideal for processing passwords, API keys, personal credentials, or proprietary data.
Base64 Encoding Reference
| Input (Plain Text) | Base64 Encoded | Use Case |
|---|---|---|
| Hello World! | SGVsbG8gV29ybGQh |
Simple text encoding |
| admin:password | YWRtaW46cGFzc3dvcmQ= |
HTTP Basic Auth |
| https://example.com | aHR0cHM6Ly9leGFtcGxlLmNvbQ== |
URL encoding |
| {"key":"value"} | eyJrZXkiOiJ2YWx1ZSJ9 |
JWT payload |
Base64 Character Set Reference
| Index | Character | Index | Character | Index | Character | Index | Character |
|---|---|---|---|---|---|---|---|
| 0-25 | A-Z | 26-51 | a-z | 52-61 | 0-9 | 62 | + |
| 63 | / | - (URL-safe)} | - (replaces +)} | _ (URL-safe)} | _ (replaces /)} | = (padding)} | Padding for alignment} |
Frequently Asked Questions
What is Base64 encoding?
Base64 is a encoding scheme that converts binary or text data into an ASCII string format using a 64-character alphabet (A-Z, a-z, 0-9, +, /). It's commonly used for transmitting data over text-only protocols like email or embedding binary data in JSON/HTML.
Is Base64 encryption or encoding?
Base64 is encoding, NOT encryption. It does not use a key and can be easily reversed by anyone. Never use Base64 to protect sensitive data like passwords or credit cards. Use proper encryption (AES, RSA) for security.
Is my data sent to a server?
No, absolutely not. Our Base64 converter processes everything locally in your browser. Your data never leaves your device — no server uploads, complete privacy.
What is URL-safe Base64?
Standard Base64 uses '+' and '/' characters which have special meanings in URLs. URL-safe Base64 replaces '+' with '-' and '/' with '_', making the output safe for URLs, query parameters, and filenames. It's used in JWT tokens.
Can I encode files with this tool?
Yes! Use the file upload button to select any file (image, PDF, document). The tool will read the file and encode it to Base64, which can then be used for data URIs or API transmission.
Is this tool free to use?
Yes, completely free with no usage limits, no registration, no watermarks. Encode and decode as much as you need. The tool is ad-supported but your privacy remains protected as no data leaves your browser.