Base64 turns any data into a string made of 64 safe characters: A–Z, a–z, 0–9, plus + and /. It is used to send binary data through systems that only handle text, such as email attachments, data URLs in web pages, and tokens in web APIs. This tool encodes text to Base64 and decodes it back, and it handles accented letters, Urdu, Arabic and emoji correctly by working in UTF-8.
How to use it
- Paste text into the input box and click Encode, or paste a Base64 string and click Decode.
- Tick URL-safe if the string will go in a web address or a JSON Web Token.
- Copy the output.
How Base64 works
The encoder takes the input three bytes (24 bits) at a time and splits them into four groups of six bits. Each six-bit value, from 0 to 63, maps to one character of the Base64 alphabet. When the input length is not a multiple of three, “=” signs pad the end. That is why Base64 output is always about 33% longer than the original.
Base64 is not encryption
Anyone can decode Base64 instantly, so never use it to hide passwords or private data. It is an encoding for transport, not a security measure.
Frequently asked questions
What does “invalid Base64” mean?
The input contains characters outside the Base64 alphabet or has the wrong length. Check for missing characters at the end, or try ticking URL-safe if the string contains - or _.
What is URL-safe Base64?
It replaces + with - and / with _, and usually drops the = padding, so the result can sit inside a URL without extra encoding.