Encode and Decode Text and Files to Base64 Format
A powerful tool for encoding and decoding Base64 strings with support for text input, file uploads, and automatic history tracking of your recent operations.
The Base64 Encoder/Decoder tool allows you to convert text and files to Base64 format and vice versa. Base64 encoding is commonly used for data transmission, storing data in databases, and embedding binary data in text-based formats like JSON and XML.
To encode text to Base64, select the Encode mode and enter your text in the input field. The tool will automatically handle Unicode characters properly.
Hello, World!SGVsbG8sIFdvcmxkIQ==To decode a Base64 string, switch to Decode mode and paste your Base64 content. The tool validates the input and displays the decoded text.
SGVsbG8sIFdvcmxkIQ==Hello, World!Note: The tool validates Base64 input before decoding. If the input is not valid Base64, you'll see a validation error.
The tool supports file uploads via drag and drop or file picker. You can encode entire files to Base64, which is useful for embedding images, documents, or other binary data in text-based formats.
Tip: Base64-encoded files are approximately 33% larger than the original binary data. Use this for embedding small files in code or data URIs.
The tool automatically saves your last 10 encoding and decoding operations in the history sidebar. This allows you to quickly revisit previous conversions.
All encoding and decoding operations are saved automatically, making it easy to track your work.
Each history item is clearly labeled with its operation type for easy identification.
The Quick Actions panel provides convenient shortcuts for common tasks.
Pre-fills the input with "Hello, World!" for quick encoding testing.
Pre-fills the input with "SGVsbG8sIFdvcmxkIQ==" for quick decoding testing.
Removes all entries from the history sidebar.
Resets the input and output fields, and clears file information.
Once you have encoded or decoded your content, several options are available for working with the output.
Copies the output to your clipboard with one click. Shows a toast notification with character count.
Downloads the output as a .txt file with a timestamped filename.
Character count is displayed below the output for reference.
The tool features an intelligent Auto mode that automatically detects whether your input is Base64-encoded or plain text, and performs the appropriate operation automatically.
Tip: Look for the status indicator below the mode tabs in Auto mode - it shows whether Base64 or plain text was detected.
Speed up your workflow with these keyboard shortcuts:
| Action | Shortcut |
|---|---|
| Process (Encode/Decode) | Ctrl / Cmd + Enter |
| Copy Output | Ctrl / Cmd + C |
| Clear All | Ctrl / Cmd + L |
| Switch to Encode Mode | Ctrl / Cmd + 1 |
| Switch to Decode Mode | Ctrl / Cmd + 2 |
The tool provides comprehensive encoding options to customize how Base64 is generated and decoded. Click "Encoding Options" to expand the settings panel.
Replaces standard Base64 characters with URL-safe alternatives:
+ becomes - (minus)/ becomes _ (underscore)Essential for URLs, cookies, and filename-safe encoding.
Toggle the trailing = padding characters on or off. Padding is used to ensure the encoded string is a multiple of 4 characters. Some systems prefer unpadded Base64.
Select the character encoding for non-ASCII text:
Enable RFC 4648 Base64URL encoding - a URL-safe alternative that omits padding and uses URL-safe characters. Commonly used in JWT tokens and OAuth.
Wrap long Base64 strings at 76 characters (MIME standard) for better readability.
Split output into fixed-length chunks: 64 characters, 76 characters, or no chunking.
Automatically format and indent JSON when decoding Base64 content that is valid JSON.
Preserve spaces and newlines in the input during encoding.
Customize the appearance of the output display with the Theme Customization panel. Click "Theme Customization" to expand the settings.
Color-code Base64 output segments for improved readability. Each group of 4 characters receives a different color from a generated palette.
Select your preferred monospace font for the output display:
Adjust the output text size using the slider (10px to 24px range). This helps optimize readability for different display contexts.
Toggle between light and dark themes for the output display area. This is independent of your overall system/browser theme preference.
Choose a custom accent color for syntax highlighting, or select from preset colors:
When you decode Base64 that contains image data, the tool automatically displays a preview of the decoded image with various controls.
The tool automatically detects when decoded content is an image and displays it in the preview panel. Supports PNG, JPEG, GIF, WebP, SVG, and other common image formats.
Choose a background color for the image preview area:
Adjust the zoom level of the image preview from 25% to 200% using the slider. Click the maximize button to reset to 100%.
The original dimensions of the decoded image are displayed once the image loads, showing the width × height in pixels.
Save the decoded image directly to your device with the "Download Image" button. The file is saved with the detected image format as its extension.
The tool includes a Secure Wipe feature that provides enhanced security when handling sensitive data. This is especially useful when working with passwords, API keys, or other confidential information.
Note: Secure Wipe is recommended when you've processed sensitive data and want to ensure it cannot be recovered from memory. For simple clearing, use the regular "Clear" button.
Your data privacy and security are our top priorities.
All encoding and decoding operations happen entirely in your browser. Your data never leaves your device. No data is sent to any server, ensuring complete privacy.
Since all processing happens locally, you get instant results without any network latency. This also means the tool works offline once loaded.
We don't store any of your input or output data. The only persistence is the local history in your browser, which you can clear at any time.
Encode authentication tokens, API keys, or binary data for API requests. Many APIs require Base64-encoded credentials.
Create data URLs for embedding images directly in HTML, CSS, or JavaScript files using Base64-encoded image data.
Embed binary data like images or files in JSON or XML by encoding them to Base64 first.
Email attachments are encoded in Base64 format. Use this tool to decode email attachments or prepare files for email.
Store binary certificates, keys, or other binary data in configuration files by converting them to Base64.
Store binary files in text-based database fields by encoding them to Base64 first.