Type text or choose a file to turn it into Base64, or paste Base64 to get the text, image or file back. It handles UTF-8 text, URL-safe Base64URL and data: URLs.
Base64 turns every 3 bytes into 4 characters, so the encoded text is about a third longer. Encoded by this page:
| Text | Base64 | Base64URL |
|---|---|---|
hello | aGVsbG8= | aGVsbG8 |
Hi! | SGkh | SGkh |
café ☕ | Y2Fmw6kg4piV | Y2Fmw6kg4piV |
a?b>c | YT9iPmM= | YT9iPmM |
Base64URL swaps + and / for - and _ and drops the = padding, so it’s safe in web addresses and in JWTs.
Choose an image and tick As a data: URL to get a string you can put straight into HTML or CSS, such as <img src="data:image/png;base64,…">. That suits small icons; big images are better as files, since Base64 makes them a third bigger and they can’t be cached on their own.
Paste Base64 that holds an image and the page shows it, with a button to download it.
No. It’s an encoding: anyone can decode it, with no key. Use it to carry bytes through text-only places such as JSON, email or URLs, never to hide anything.
The data is probably binary (an image, a zip, encrypted bytes) and not text. The page detects that and offers it as a file instead.
Padding: it makes the length a multiple of 4. It can be left off, as Base64URL usually does, and this page decodes either way.
No. Files are read and encoded in your browser.
Open all 35 Dev Tools. Everything runs in your browser; nothing you paste is uploaded.