Skip to content
Language:en

Base64 and URL encoder / decoder

Encode and decode Base64 or URL text both ways, and turn any file into Base64 or a data URI.

Encoding

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

  1. Choose Base64 or URL encoding.
  2. Type plain text on the left to encode it, or paste encoded text on the right to decode it.
  3. Optionally drop a file to encode it, or download decoded bytes as a file.
  4. 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.

Frequently asked questions

Is Base64 encryption?
No. Anyone can decode Base64 instantly; it only changes how data is written. Never use it to hide passwords or personal data.
Why does decoding say the result is not text?
The Base64 contains binary data such as an image or a PDF. Use “Download as file” to save it; the file type is detected automatically.
What is the difference between the two URL modes?
“Parameter value” encodes every reserved character, which is right for a value inside a query string. “Full URL” keeps characters such as “/”, “?” and “&” so the link still works.
Can I decode a JWT token?
Yes, paste one of its parts (between the dots) in the Base64 box: the URL-safe alphabet and missing padding are accepted. The signature part is binary and will not show as text.