Base64 Encoder / Decoder
Encode or decode Base64 strings and files instantly
Encode text or files to Base64, or decode Base64 strings back to their original form. Supports images, PDFs, and any binary file — all encoding runs in your browser.
What is Base64?
Base64 is a binary-to-text encoding that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is used to safely transmit binary data over text-only channels like email bodies, URLs, and JSON APIs.
Common uses
- Embedding images directly in HTML or CSS (data: URLs).
- Sending binary file attachments in email (MIME).
- Encoding credentials in HTTP Basic Auth headers.
- Storing small binary blobs in JSON APIs.
- Transmitting certificates and keys in PEM format.
Frequently asked questions
Can I encode images?
Yes. Upload any image (JPG, PNG, SVG, GIF, WebP) and get a ready-to-use Base64 data URL you can paste into HTML or CSS.
What is the character overhead?
Base64 output is ~33% larger than the original binary (3 bytes become 4 characters). For a 100 KB image, expect ~133 KB of Base64 text.
What is URL-safe Base64?
A variant that replaces + with - and / with _ so the output is safe to use in URLs and filenames, without needing percent-encoding.
Is Base64 the same as hashing?
No. Base64 is reversible encoding — you can decode it back. Hashing (SHA-256, MD5) is one-way and produces a fixed-length fingerprint.