Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 back to readable text. Character count and byte size shown for both input and output.
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text.
How it works
Base64 encoding converts arbitrary binary data into a string of printable ASCII characters. Every 3 bytes of input produce 4 characters of output, using the alphabet A-Z a-z 0-9 + / plus = for padding.
This tool handles full UTF-8 text correctly. Multi-byte characters (accented letters, CJK, emoji) are first encoded to UTF-8 bytes, then those bytes are Base64-encoded. Decoding reverses the process faithfully.
All processing runs in your browser using the native btoa() and atob() functions with a UTF-8 wrapper. No data leaves your device.
FAQ
- What is Base64?
- Base64 is a binary-to-text encoding scheme that represents binary data as a string of printable ASCII characters. It uses 64 characters (A-Z, a-z, 0-9, +, /) plus = for padding. It is not encryption — it is a reversible encoding.
- When should I use Base64?
- Base64 is commonly used to embed binary data in text-based formats: images in HTML/CSS (data URIs), file attachments in email (MIME), credentials in HTTP Basic Auth headers, and binary data in JSON payloads.
- What is the difference between Base64 and encryption?
- Base64 is encoding, not encryption. Anyone can decode a Base64 string without a key. It provides no security whatsoever. Use it for transport compatibility, not for protecting sensitive data.
- Why does Base64 make strings longer?
- Base64 encodes 3 bytes of input into 4 characters of output, resulting in roughly 33% size increase. This overhead is the cost of representing arbitrary binary data using only printable ASCII characters.
- What is URL-safe Base64?
- Standard Base64 uses + and / characters, which have special meaning in URLs. URL-safe Base64 replaces + with - and / with _, and often omits the trailing = padding. This variant is used in JWTs and data URIs in URLs.
- Is Base64 encoding secure?
- No. Base64 is trivially reversible. Never use Base64 to protect passwords, API keys, or sensitive data. It is a transport encoding, not a security mechanism. Use proper encryption (AES, RSA) for security.
Other tools you might like
- Wealth ProjectionBuild wealth or draw it down. Watch compounding tip the scale — and see how long your corpus really lasts.
- Loan & EMI PlannerSee what your loan really costs — month by month, year by year — and how prepayments rewrite the math.
- Mortgage CalculatorMonthly payment, taxes, insurance, PMI — the full picture of what your home really costs.
- Compound Interest CalculatorWatch your money grow year by year. See exactly how compounding works in your favor.
- SIP CalculatorSee how small monthly investments grow into a large corpus through the power of compounding.
- Salary CalculatorYour real take-home pay — federal, state, and FICA, all 50 states.