Base64 Encoder & Decoder
Encode or decode text, files and images to Base64 instantly — entirely in your browser. No uploads, no sign-up, no limits.
When is Base64 used?
Inline images in CSS/HTML
Embed small images directly into stylesheets or HTML as data: URIs — reducing HTTP
requests.
Email attachments
MIME email encodes attachments as Base64 so binary files survive plain-text email protocols.
API tokens & auth
HTTP Basic Auth and many JWT payloads use Base64 to safely transmit credentials and data in headers.
JSON data transfer
Binary data (images, PDFs) cannot go directly into JSON — Base64 encoding makes it safe for text-based APIs.
Config & environment variables
Secret keys, certificates and binary configs are often Base64-encoded for safe storage in .env files.
URL-safe data
Base64url variant encodes arbitrary data for use in URLs without special character conflicts.
FAQ
Does my file or text get uploaded anywhere?
No. Everything runs in your browser using JavaScript's built-in btoa/atob functions and the FileReader API. Your data
never touches a server.
Is there a file size limit?
There is no enforced limit — the only constraint is your device's available memory. Very large files (hundreds of MB) may slow the browser tab but will still process correctly.
What is the difference between Base64 and Base64url?
Standard Base64 uses + and / characters which have special meaning in URLs.
Base64url replaces them with - and _. This tool uses standard Base64 — replace
those two characters manually if you need URL-safe output.
Does Base64 compress data?
No — Base64 increases the data size by approximately 33% because it encodes every 3 bytes as 4 ASCII characters. It is an encoding scheme, not compression.
Can I decode an image back to a file?
Yes. Paste a Base64 string into the Decode mode, run it, and click Download file — the browser will reconstruct the original binary and let you save it.