How to use the Base64 tool
- Choose Encode to turn text into Base64, or Decode to turn Base64 back into text.
- Type or paste into the first box. The result updates as you type.
- Copy or download the result, or choose Use as input to reverse it.
Base64 is encoding, not encryption
Base64 writes any data using 64 safe characters (A–Z, a–z, 0–9, + and /), so it can travel through systems that only expect plain text: email attachments, JSON fields, data URIs and HTTP headers. Anyone can decode it. Never use Base64 to hide passwords, API keys or personal data; it protects nothing.
Encoded output is about a third longer than the input, because every 3 bytes become 4 characters. The = signs at the end are padding that fills the last group of 4.
Text, UTF-8 and binary files
Text is converted to UTF-8 bytes before encoding, so accented letters, Arabic and Urdu script, Chinese and emoji all decode back exactly. (The browser’s own btoa() fails on them.) When Base64 decodes to something that is not readable text, such as an image or a PDF, the tool shows its bytes in hexadecimal, names the file type when it can, and lets you download the decoded file.
URL-safe Base64
The URL-safe variant (Base64URL, RFC 4648 §5) uses - and _ instead of + and / and usually drops the padding, so the result can sit in a URL or file name unchanged. JSON Web Tokens use it. Decoding recognises either alphabet, and accepts data URIs (data:…;base64,…), missing padding and line breaks.
Everything happens in your browser: nothing you type here is sent to this site.