How Base64 encoding works
Base64 writes any data using 64 safe characters: A–Z, a–z, 0–9, + and /, with = as padding at the end. It reads the input three bytes at a time and writes those 24 bits as four characters of 6 bits each, which is why encoded text is always about a third longer than the original. Before encoding, this tool turns your text into UTF-8 bytes, so Hindi, Punjabi and emoji survive the round trip.
Worked example
“TryQuizLab” is 10 bytes and encodes to VHJ5UXVpekxhYg== (16 characters, two of them padding). The Hindi word नमस्ते is 6 characters on screen but 18 bytes in UTF-8, so it encodes to 4KSo4KSu4KS44KWN4KSk4KWH, which is 24 characters long.
Limits and common mistakes
- Base64 is not encryption. Anyone can decode it in a second, so never use it to hide a password or an API key.
- The decoder expects standard Base64. The “URL-safe” variant uses - and _ in place of + and /; swap those back before decoding.
- Decoding something that was never UTF-8 text, such as an image or a PDF, shows an error, because the result cannot be displayed as text.
- This tool works on text you paste. It does not read or write files.
Frequently Asked Questions
Will Hindi and emoji survive encoding and decoding?
The encoder converts text to UTF-8 bytes before creating Base64, and the decoder reverses that process. For example, ₹100 encodes to 4oK5MTAw. Paste the encoded result into Decode to check the round trip.
Can I use Base64 to hide a password?
Base64 is reversible encoding. Anyone who has the encoded text can decode it without a key. Keep passwords, access tokens and other secrets out of text you plan to share.
Why does a Base64 string fail to decode?
Check for missing characters and whether the string uses the URL-safe alphabet, which substitutes - and _ for + and /. This tool expects standard Base64 containing UTF-8 text; arbitrary binary files cannot be displayed as text.