Encode and decode text or files to Base64. Fast, free, in-browser.
Encode text or files to Base64 and decode Base64 back to original data. Supports text and binary file encoding. Pure JavaScript — nothing is uploaded.
Upload your file using the tool above.
Adjust any settings to your preference.
Click the process button and wait for results.
Download your output using the download button.
No, and treating it as one is a common and serious mistake. Base64 is an encoding — anyone can decode it instantly with no key. It exists to move binary data safely through text-only channels like email or JSON, not to hide anything. Never use it to protect passwords, tokens or personal data.
Base64 represents every 3 bytes as 4 characters, so encoded data is always about 33% larger. That overhead is the price of making binary safe to embed in text. It is why inlining large images as data URIs hurts page weight — for anything sizeable, a normal file reference is better.
Usually the string is truncated, has stray whitespace or line breaks from copying, or is URL-safe Base64 using - and _ instead of + and /. Valid Base64 length is always a multiple of 4, padded with = at the end, so a length that is not divisible by 4 is a reliable sign something was lost in transit.
Yes, Base64 Encoder / Decoder is completely free. No signup, no account, and no watermark on outputs. A Pro tier is available for 100 AI ops/day and larger file sizes.
Base64 Encoder / Decoder runs entirely in your browser. Your file is never uploaded — it is read, processed and saved locally, so it never reaches our servers or anyone else's. You can disconnect from the internet after the page loads and it still works.
Base64 variant
Drag & drop any file to Base64-encode it
Images, PDFs, fonts, binaries — any file type
3 bytes → 4 chars
Every 3 bytes (24 bits) of input is split into four 6-bit groups, each mapped to one of 64 printable ASCII characters.
+33% size overhead
4 chars replace every 3 bytes, so Base64 is always ~33% larger than the original. This is Base64's main trade-off.
= padding
If the input isn't a multiple of 3 bytes, one or two = chars are appended to make the output a multiple of 4 in length.
What is Base64? Base64 is a binary-to-text encoding that represents binary data using 64 printable ASCII characters. It lets you safely embed binary content in text-only systems like email, JSON, XML, and HTTP headers.
Standard vs URL-Safe: Standard Base64 uses + and / which are special in URLs. URL-Safe replaces them with - and _. JWT tokens use URL-Safe Base64 without padding.
Line wrapping: MIME (RFC 2045) wraps at 76 characters — used in email. PEM wraps at 64 characters — used for SSL certificates. Raw output is a single line for JSON values and HTTP headers.
Privacy: All encoding and decoding runs in your browser using native JavaScript (btoa / atob). No data is uploaded to any server.