Encode or decode Base64 strings and files instantly in your browser
Base64 is a binary-to-text encoding scheme that uses 64 ASCII characters (uppercase letters, lowercase letters, digits, plus, and slash) to represent binary data as readable text. It was originally designed for email attachments (MIME) which couldn't handle raw binary data, but is now used everywhere — embedding images directly in HTML and CSS as data URIs, transmitting binary payloads in JSON APIs, encoding HTTP Basic Authentication credentials, storing binary content in XML, and many other developer use cases. Base64 is encoding, not encryption: it makes binary data text-safe, but the original content can be instantly decoded by anyone — never use it to hide sensitive information.
Common use cases: embedding small images, fonts, or icons directly in CSS as data URIs to reduce HTTP requests; sending binary data through JSON APIs that only accept text; encoding HTTP Basic Auth headers (username:password); attaching files to MIME emails; storing binary content in XML configuration files; passing image data between client and server; encoding tokens like JWT signatures; and any developer scenario where binary data needs to travel safely through a text-only channel.
📥 Encode: turn any text into Base64. Type or paste text and the Base64 output is generated live.
📤 Decode: reverse Base64 back to readable text. Paste a Base64 string and see the decoded content instantly.
📁 File to Base64: drag any file (image, PDF, document) up to 5MB and get its complete Base64 representation, perfect for embedding in code or data URIs.
1. Choose a tab — Encode, Decode, or File to Base64
2. Enter your text or upload a file
3. The result appears instantly as you type
4. Click "Copy" to put the result in your clipboard
5. For files, you can also download the Base64 as a .txt file
✅ 100% free — no signup, no ads in tool, no tracking
✅ Client-side only — your data never leaves your device
✅ UTF-8 support — handles emojis and international characters
✅ Three modes: text encode, text decode, file to Base64
✅ Live stats: input/output size and compression ratio
✅ Works on Windows, Mac, Linux, Android, iOS — any browser
✅ Files up to 5MB
Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It's commonly used to embed images in HTML/CSS, transmit binary data through text-only channels like email (MIME), encode credentials in HTTP Basic Auth, and store binary content in JSON or XML.
No. Base64 is encoding, not encryption. Anyone who sees Base64-encoded text can decode it instantly back to the original. Never use Base64 to hide passwords or sensitive data — use proper encryption like AES instead. Base64 is meant to safely transport data through text channels, not to secure it.
Base64 increases data size by approximately 33% because it represents 3 bytes of binary data using 4 ASCII characters. This is the trade-off for being able to safely transmit binary content through text-only systems. The expansion ratio is exactly 4:3 plus padding characters.
No. All encoding and decoding happens entirely in your browser using JavaScript's built-in btoa/atob and FileReader APIs. Your text and files never leave your device — nothing is uploaded or logged. This makes the tool safe for confidential data.
Yes. Switch to the File to Base64 tab to upload any file (images, PDFs, documents) up to 5MB. The tool reads the file as binary and encodes it to a Base64 string you can copy or download. This is useful for embedding images in CSS data URIs, JSON payloads, or email attachments.
☕ Support FileTools
Enter any amount in USD and click PayPal to donate