Base64 and URL encoder / decoder
Encode and decode Base64 or URL text both ways, and turn any file into Base64 or a data URI.
Encode a file
Runs entirely in your browser. Your files never leave your device.
About this tool
Base64 turns any data into plain letters and digits so it can travel inside JSON, e-mails, CSS or HTML. Type in the left box to encode, or paste Base64 in the right box to decode: both sides stay in sync. Accented letters and emoji are handled as UTF-8, and the URL-safe alphabet used by JWT tokens is supported.
Drop a file to get its Base64 or a ready-to-use data URI for an image in CSS, and download decoded data back as a file. Switch to URL mode to percent-encode query parameters or read an encoded link. Nothing leaves your device, so secrets and tokens stay private.
How it works
- Choose Base64 or URL encoding.
- Type plain text on the left to encode it, or paste encoded text on the right to decode it.
- Optionally drop a file to encode it, or download decoded bytes as a file.
- Copy the side you need.
Base64 makes data about 33 % larger: every 3 bytes become 4 characters. The URL-safe variant replaces “+” and “/” with “-” and “_” and drops the “=” padding.
Worked example
“Hello” encodes to SGVsbG8=, and the accented “é” to w6k=, because it takes two bytes in UTF-8.
Drop a 2 KB icon and you get a data URI of about 2.7 KB that you can paste in CSS as background-image: url(data:image/png;base64,…), saving one request on a small site.
Good to know
- Base64 is about a third larger than the original data, so keep data URIs for small files.
- It is an encoding, not encryption: anyone can decode it, so never treat it as a way to hide a password.
- JWT tokens use the URL-safe alphabet (- and _ instead of + and /) without padding.