Loading tool…
How to Encode and Decode Base64
Base64 converts binary data into a text-safe format using 64 ASCII characters. This tool encodes and decodes both text strings and small files.
- Paste text or drop a file into the input area.
- Click Encode to convert to Base64, or Decode to convert back to plain text/binary.
- Copy the result or download the decoded file.
How Base64 Encoding Works
Base64 takes every 3 bytes (24 bits) of input and splits them into 4 groups of 6 bits. Each 6-bit group maps to one of 64 characters (A-Z, a-z, 0-9, +, /). If the input length is not divisible by 3, padding characters (=) are appended. The encoded output is always ~33% larger than the input. Base64 is used in email (MIME), data URIs, JWT tokens, and API payloads.
Why Use Our Base64 Tool?
- Bidirectional — encode and decode in one interface.
- File support — drag-and-drop files for binary-to-Base64 conversion.
- URL-safe variant — option for Base64url encoding (- and _ instead of + and /).
- No server — everything runs in your browser via the Web APIs.
Frequently Asked Questions
Is Base64 encryption?
No. Base64 is encoding, not encryption. Anyone can decode a Base64 string. It is used for safe transport of binary data over text-based protocols, not for security.
Why is the output longer than the input?
Base64 represents every 3 bytes as 4 characters, so the output is always approximately 33% larger than the input.
What is Base64url?
Base64url replaces + with - and / with _ to make the output safe for URLs and filenames. It is used in JWTs and many web APIs.
Is my data private?
Yes. Encoding and decoding happen entirely in your browser. No data is transmitted.