Base64 Encoder & Decoder
Text, Files & Images
Encode text, files, and images to Base64 or decode Base64 back to original content. Supports URL-safe encoding, Data URIs, JWT decoding, and file downloads. 100% client-side - your data never leaves your browser.
Input Text
Drag & drop a file here or click to browse
Max file size: 10MB
Drag & drop an image here or click to browse
Supports PNG, JPG, GIF, WebP, SVG
Base64 Output
Header
Payload
Signature
Base64 Quick Reference
What is Base64?
Base64 encodes binary data into ASCII text using 64 characters (A-Z, a-z, 0-9, +, /). It's commonly used for embedding images in CSS/HTML, encoding email attachments, and transmitting binary data over text-based protocols.
Size Overhead
Base64 encoding increases data size by approximately 33%. Every 3 bytes of input becomes 4 characters of output. Consider this when embedding large files or images.
URL-Safe Base64
URL-safe Base64 replaces + with - and / with _, making it safe for URLs, filenames, and query parameters.
Data URIs
Data URIs embed files directly in HTML/CSS using the format: data:[mime-type];base64,[data]. Great for small images to reduce HTTP requests.
JWT Tokens
JSON Web Tokens use URL-safe Base64 to encode the header and payload. The signature is also Base64-encoded. JWTs are widely used for authentication and authorization.
Common Uses
- Embedding images in CSS/HTML
- Email attachments (MIME)
- API data transmission
- Storing binary in JSON/XML
Common Use Cases
Embed Images in CSS
Convert small icons and images to Data URIs for embedding directly in stylesheets, reducing HTTP requests.
Email Attachments
MIME encoding uses Base64 to safely transmit binary attachments through email systems that only support text.
Store Binary in JSON
Encode files, images, or other binary data for storage in JSON, XML, or other text-based formats.
Debug JWT Tokens
Decode JWT tokens to inspect the header, payload, and verify claims during authentication debugging.
API Data Transfer
Safely transmit binary data through REST APIs that expect JSON or XML payloads.
Inline SVG in CSS
Encode SVG files for use as CSS background images without external file dependencies.
Frequently Asked Questions
Pro Tip: Link directly with ?encode=Hello or ?decode=SGVsbG8= - auto-processes on page load!
Why We Built This Base64 Tool
Developers constantly need to encode and decode Base64 data - embedding images in CSS, debugging JWT tokens, preparing data for APIs, or extracting files from Base64 strings in logs. Most online Base64 tools are basic single-purpose converters that lack the features developers actually need: file handling, image previews, JWT parsing, URL-safe variants, and Data URI generation. We built this comprehensive Base64 encoder/decoder to handle all these use cases in one place.
Unlike other Base64 tools that upload your data to servers, this tool processes everything locally in your browser. Your sensitive data - API keys, authentication tokens, private images, confidential documents - never leaves your device. The tool works completely offline once loaded, making it safe for enterprise environments, air-gapped systems, and any situation where data privacy is critical.
This Base64 tool is part of RJL.io's collection of free developer tools - each designed to do one thing exceptionally well. Working with code formatting? Try our Pretty Print tool. Need to embed SVGs in CSS? Use our SVG URL Encoder. Building QR codes? Check our QR Code Generator. Every tool is 100% client-side, works offline, and respects your privacy.