Encode text to Base64, or decode Base64 back to text — with full Unicode support.
How to Use the Base64 Encoder/Decoder
Enter text into the box (or paste Base64 you want to decode).
Click "Encode" to convert plain text to Base64, or "Decode" to convert Base64 back to plain text.
Click "Copy to Clipboard" to copy the result.
How Base64 Encoding Works
Base64 works on bytes, not letters. It takes the input three bytes (24 bits) at a time, splits those 24 bits into four groups of 6 bits, and writes each 6-bit number (0 to 63) as one character from a fixed alphabet: A to Z for 0 to 25, a to z for 26 to 51, the digits 0 to 9 for 52 to 61, then + for 62 and / for 63.
When the last group has only one or two bytes, the output is padded with = signs so its length is always a multiple of four. Because every 3 bytes become 4 characters, Base64 output is about one third larger than the original data.
For text, this tool first converts your input to UTF-8 bytes and then Base64-encodes those bytes. Decoding does the reverse: it turns the Base64 back into bytes and reads them as UTF-8. That is why Hindi, Tamil, the rupee sign and emoji survive a round trip correctly.
Worked Example: Encoding "Hi"
The letters H and i are the bytes 72 and 105, or 01001000 01101001 in binary.
That is only 16 bits, so two zero bits are added to make 18 bits, which split into three 6-bit groups: 010010, 000110, 100100.
Those groups are the numbers 18, 6 and 36, which map to S, G and k.
Two input bytes produce three characters, so one = is added to complete the group of four. The result is SGk=.
More results you can check with the tool:
Input text
UTF-8 bytes
Base64 output
H
1
SA==
Hello
5
SGVsbG8=
India 2026
10
SW5kaWEgMjAyNg==
₹
3
4oK5
नमस्ते
18
4KSo4KSu4KS44KWN4KSk4KWH
The last two rows show why character count is a poor guide to output size. The rupee sign is a single character but three UTF-8 bytes, and the six Devanagari characters of नमस्ते take 18 bytes, which become 24 Base64 characters.
Where You Will Meet Base64
Data URIs, where a small image or font is embedded directly in HTML or CSS after the text "base64,".
Email attachments, which are sent as Base64 text inside the message.
JSON APIs that need to carry a file, such as a PDF or a signature image, inside a text field.
HTTP Basic authentication, where "username:password" is Base64-encoded in a request header. Anyone who sees the header can decode it, which is why it must only be used over HTTPS.
JSON Web Tokens (JWTs), whose header and payload are Base64url-encoded JSON. Decoding them lets you read the claims, but it does not verify the signature.
Limitations of This Tool
It is a text tool. Decoded bytes are always read as UTF-8 text, so Base64 that represents an image, PDF or ZIP file usually produces the "Invalid Base64 input" error even when the Base64 itself is correct, because those bytes are not valid text.
The URL-safe variant (Base64url), used in JWTs and some web links, writes - instead of + and _ instead of /. This decoder accepts only the standard alphabet, so replace each - with + and each _ with / before decoding.
Missing = padding and line breaks, such as the wrapped lines found in email source, are tolerated by the browser's decoder. Other stray characters, such as quotes copied along with the value, cause an error.
Frequently Asked Questions
Base64 converts binary or text data into a text-safe format made up of letters, digits, and a few symbols, commonly used to embed data in JSON, URLs, emails, or data-URIs.
Yes, it correctly encodes and decodes Unicode text by converting to/from UTF-8 bytes before Base64 conversion.
Decoding fails if the input isn't valid Base64 — for example if it contains characters outside A-Z, a-z, 0-9, +, /, = or has incorrect padding.
No. Base64 uses no key and anyone can reverse it in a second, as this tool shows. It only changes how data is represented. Never rely on it to hide passwords, PAN or Aadhaar numbers, or other personal data; use proper encryption for that.
Every 3 bytes of input become 4 output characters, plus up to two = signs of padding, so the output is roughly 33% larger than the input in bytes. Text in Indian scripts grows more relative to its character count, because each Devanagari or Tamil character takes 3 bytes in UTF-8.