Encode text or files to Base64 — and decode Base64 back. 100% in your browser.
Frequently Asked Questions
What is Base64 encoding?
Base64 represents binary data using 64 ASCII characters. Every 3 bytes become 4 characters, making binary data safe for text-based systems like email, HTML, and JSON.
Is my data sent to a server?
No. Everything runs in your browser. No data leaves your device — no network requests, no server processing.
What is URL-safe Base64?
URL-safe Base64 replaces + with - and / with _, removing = padding. Used in JWT tokens and URL parameters where standard Base64 characters would cause issues.
Can I encode images and files?
Yes! Click "Encode File" to select any file. The output includes the data URI prefix (data:mime;base64,...) so you can paste it directly into HTML or CSS.
Does Base64 compress data?
No — Base64 increases size by ~33%. It's an encoding scheme, not compression. Use gzip for actual compression.
Why does decoded output look like gibberish?
If the original data was binary (images, PDFs, etc.), the decoded output is also binary. The garbled text is valid binary data.
What's the difference between Base64 and Base32?
Base64 uses 64 chars (~33% overhead, most compact). Base32 uses 32 chars (~60% overhead, case-insensitive). Hex uses 16 chars (100% overhead, very readable).
Where is Base64 commonly used?
Data URIs in HTML/CSS, email attachments (MIME), JWT tokens, API auth, favicons, embedding small files in source code, and transmitting binary in JSON/XML.
📖 How to Use the Base64 Encoder / Decoder
Step 1: Choose a mode. Select "Encode" to convert text or files to Base64, or "Decode" to convert Base64 back to readable text.
Step 2: Enter your input. Type or paste text into the input area. To encode a file (image, PDF, document), click the "📁 Encode File" button to select a file from your device.
Step 3: Configure options. Toggle "URL-safe mode" if the output will be used in URLs or query parameters (replaces + and / with - and _). Enable "Line break every 76 chars" for MIME-compliant formatting.
Step 4: Click "Convert". The result appears instantly below. The stats bar shows character count, byte size, and the size overhead percentage for encoded data.
Step 5: Copy or swap. Use "Copy Result" to copy to clipboard, or "Swap" to move the output to input and switch modes — handy for round-trip testing. Everything runs in your browser with zero server contact.