What it does
Base64 writes any data, text or binary, using only 64 safe characters, so it can travel through JSON, URLs, email and config files. Encode text or a whole file, or decode a Base64 string back. Text is handled as UTF-8, so accents, Arabic, Chinese and emoji come back exactly, which a plain btoa() call in JavaScript can’t do. The decoder accepts standard and URL-safe Base64, with or without padding or line breaks, and if the decoded data is a file such as a PNG or PDF, it recognises it and lets you download it.
How to use it
- Choose “Encode” or “Decode”.
- Type or paste your text. The Base64 result appears as you type, and any problem is pointed out with its position.
- When encoding, tick “URL-safe” for Base64URL (- and _ instead of + and /, without padding), as used in JWTs and URLs. When decoding, both kinds are detected automatically.
- Copy the result, download it, or click “Decode this” / “Encode this” to convert it back.
Common uses
- Reading a Base64 value from an API response, a Kubernetes secret or an email header
- Encoding credentials for an HTTP Basic Authorization header (user:password)
- Turning a small file into text to embed it in JSON or a config file
Tips
- Base64 isn’t encryption: anyone can decode it. Don’t use it to hide passwords or keys.
- Encoded data is about a third larger than the original: every 3 bytes become 4 characters.
- For images in HTML or CSS, Image to Base64 gives you a ready-made data URI, img tag or CSS rule.