About this tool
What is Base64?
Base64 is a binary-to-text encoding that represents arbitrary bytes with 64 printable ASCII characters (A–Z, a–z, 0–9, + and /, with = as padding). It is used wherever raw bytes cannot travel safely: email attachments (MIME), data URIs in HTML/CSS, JSON payloads, and HTTP basic-auth headers.
How to use this tool
- Paste or type text in the input box — encoding starts automatically.
- Switch direction to decode a Base64 string back to readable text.
- Use the file variant for images, PDFs or other binary files.
Examples
Helloencodes toSGVsbG8=.- A 1×1 red PNG pixel becomes a long string you can paste into a
data:image/png;base64,…URI. - Check the trailing
=padding: one=means the input length mod 3 was 2, two means it was 1.
Important limitations
- Base64 is not encryption. Anyone can decode it — never use it to hide secrets or passwords.
- Encoded output is about 33% larger than the input, so it is wasteful for large files.
- There are two common alphabets: standard (
+/) and URL-safe (-_). Mixing them breaks decoding.
Privacy
Encoding and decoding happen entirely in your browser with JavaScript. Your text never leaves your device — nothing is uploaded, stored, or logged.
Frequently asked questions
Why does my output end with =?
The = characters are padding. Base64 works in 3-byte groups; padding fills the last group when the input length is not a multiple of 3.
Is Base64 secure?
No. It is an encoding, not encryption. It only changes representation, so treat encoded secrets as plain text.
What is URL-safe Base64?
A variant that replaces + with - and / with _ so the output survives inside URLs without percent-encoding.
Related tools
Base64 file converter · URL encoder · Hash generator · Encryption (AES)