Base64 Encoder & Decoder
Encode or decode Base64 text with full Unicode support.
How to use: Paste text and choose Encode or Decode. Copy the result when you are done.
How to use the Base64 Encoder & Decoder
Base64 is a way of writing binary data using only 64 safe text characters: letters, numbers, plus and slash. It is used in email attachments, data URLs, authentication headers and many APIs, wherever raw bytes might be corrupted by systems that expect plain text.
To encode, type or paste text into the input box and press Encode. To decode, paste Base64 and press Decode. The tool first converts your text into UTF-8 bytes, so emoji, accents and non-Latin scripts survive the round trip, something the basic browser function btoa cannot do alone.
Tick the URL-safe option to produce the variant that replaces “+” with “-” and “/” with “_” and drops the trailing “=” padding. This is the form used in JSON Web Tokens and many web addresses. When decoding, the tool accepts both variants, ignores line breaks and spaces, and repairs missing padding automatically.
Remember that Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide passwords or secrets. It also makes data about one third larger. If decoding produces binary data rather than readable text, such as an image, the tool will tell you the result is not valid text.
Frequently asked questions
Is Base64 secure?
No. It is a reversible encoding that anyone can decode. Use proper encryption to protect sensitive data.
Why does Base64 end with equals signs?
Padding characters are added so the output length is a multiple of four. URL-safe Base64 often omits them.
Why does decoding fail?
The input probably contains characters outside the Base64 alphabet, or has an impossible length, or decodes to binary rather than text.