Base64 Encoder / Decoder
Encode text or data to Base64 and decode Base64 strings back to plain text instantly.
About Base64 Encoder/Decoder
Convert any text to Base64 encoding for safe transmission over text channels, or decode Base64 strings back to readable text.
About this calculator
A simple two-box Base64 tool: paste input, press Encode or Decode, and copy the result.
Developers use Base64 daily: in API payloads, HTTP Basic auth headers, JSON Web Tokens, data URIs and email. This tool runs in your browser, so you can safely inspect values.
How to use it
- Paste input in the first box.
- Press → Encode or ← Decode.
- Press Copy.
How Base64 works
Base64 turns binary data into text using 64 safe characters: A to Z, a to z, 0 to 9, + and /. Every 3 bytes (24 bits) become 4 characters (6 bits each), and = padding fills the end. The output is about 33% larger than the input. The URL-safe variant swaps + and / for - and _. Base64 is an encoding, not encryption: anyone can decode it.
Worked example
Examples
| Hello | SGVsbG8= |
| Hello, World! | SGVsbG8sIFdvcmxkIQ== |
| SGVsbG8= | Hello |
Runs entirely in your browser. Nothing you paste is uploaded.
Tips and common mistakes
- Base64 is not security. Never use it to hide passwords.
- Use URL-safe Base64 for tokens placed in URLs.
- Padding (=) can be omitted in some systems, but keep it unless the spec says otherwise.
- Non-ASCII text is encoded as UTF-8 bytes first.
- Large files make huge Base64 strings. Prefer binary upload for anything over a few hundred KB.
Frequently asked questions
What is Base64?
A way to represent binary data as plain text using 64 characters.
Is Base64 encryption?
No. It is reversible by anyone and offers no secrecy.
Why is Base64 33% bigger?
Every 3 bytes become 4 characters.
What is the = at the end?
Padding so the length is a multiple of 4.
What is URL-safe Base64?
A variant using - and _ instead of + and /.
Where is Base64 used?
Email attachments, data URIs, JSON Web Tokens and API payloads.