Base64 Encode/Decode
Encode text or files to Base64, decode Base64 back. Supports URL-safe variant and Data URI.
Enter your text
Paste or type your content into the input field.
Adjust settings
Configure options to get the result you want.
Copy or save
Copy the output to clipboard or save it.
Key Features
Real-Time Conversion
Encode or decode instantly as you type. No button clicks needed — results update live with every keystroke.
Text & File Support
Encode any file (images, PDFs, ZIPs) to Base64, or paste Base64 to decode and download the original file.
URL-Safe Base64 (RFC 4648)
One-click switch to URL-safe variant that replaces +/ with -_ and omits padding. Perfect for JWT tokens and URL parameters.
Data URI Output
Generate ready-to-use data:{mime};base64,... strings for embedding images, fonts, or files directly in HTML, CSS, or JS.
Image Preview & Auto-Detect
Automatically detects decoded images (PNG, JPEG, GIF, WebP) and shows an inline preview. Smart detection switches to decode mode when Base64 input is detected.
Swap, Stats & Privacy
One-click output-to-input swap, real-time byte size display, and 100% browser-side processing — your data never leaves your device.
About This Tool
What is Base64 Encoder/Decoder?
Base64 Encoder/Decoder converts text and files to Base64 encoding and back. Base64 is a binary-to-text encoding scheme commonly used to embed data in URLs, emails, HTML, and JSON where binary data isn't supported.
Encode text or any file (images, PDFs, ZIPs) to Base64, or decode Base64 strings back to text or downloadable files — all in your browser, with URL-safe variant and Data URI support.
Common Use Cases
- Data URIs: Encode images or fonts as Base64 data URIs for embedding in HTML/CSS without external file requests
- JWT Tokens: Decode JWT payloads using URL-safe Base64 for debugging and inspection
- API Authentication: Encode credentials for HTTP Basic Authentication headers
- File Transfer: Convert binary files to Base64 text for inclusion in JSON APIs, emails, or configuration files
- Email Attachments: Encode/decode MIME attachments in email protocols
- Developer Debugging: Quickly inspect Base64-encoded data in logs, tokens, or API responses
Privacy-First Base64 Processing
All encoding and decoding happens directly in your browser. Your files and text are processed locally and never uploaded to any server.
- Ideal for encoding sensitive credentials, tokens, and private files
- No server-side processing, no logging, no data collection
- Works completely offline after initial page load
- Install as a PWA for instant access without internet