Base64 Encoder / Decoder
Free online Base64 encoder and decoder. Convert text or files to Base64 strings, preview Base64 images, and download decoded files — 100% client-side.
Base64 Encoder / Decoder Guide
Free online Base64 encoder and decoder. Convert text or files to Base64 strings, preview Base64 images, and download decoded files — 100% client-side.
Step-by-Step Usage Guide
-
1 Select Mode & Source
Toggle between Encode and Decode modes, and specify whether your source payload is plain text or a binary file.
-
2 Input Text or Drop File
Paste UTF-8 text strings or drop arbitrary file formats (PNG, JPG, PDF, SVG, ZIP) into the workspace.
-
3 Configure Formatting
Enable URL-Safe mode (substituting + and / with - and _) or format as an embeddable CSS/HTML Data URI.
-
4 Export Output
Copy Base64 text to your clipboard or download decoded binary assets back to your local drive.
Key Features & Architecture
Binary file streams are processed via native FileReader and TypedArray buffers. Zero network data transmission.
Automatically parses Magic Bytes to detect PNG, JPEG, GIF, and PDF streams with instant visual previews.
Replaces reserved URL characters (+ and /) with web-safe equivalents (- and _) for routing tokens.
Frequently Asked Questions
Is Base64 considered encryption or security?
No. Base64 is strictly an encoding format designed for safe data transmission across text-based protocols. It provides zero cryptographic security, as anyone can reverse it immediately.
Why does Base64 increase file size by roughly 33%?
Because three 8-bit bytes (24 bits) are translated into four 6-bit characters (24 bits). Each resulting character requires 8 bits of text storage, creating a 4/3 ratio increase.
What is a Data URI and when should I use it?
A Data URI embeds file payloads directly into HTML or CSS (e.g. data:image/png;base64,...). It is ideal for small UI icons or SVGs, eliminating extraneous HTTP requests.
Are my uploaded files or text sent to external servers?
No. The conversion logic runs entirely on your local machine using the browser's native btoa(), atob(), and FileReader APIs.