developer

URL Encode & Decode Guide: Master Percent-Encoding

Spaces, ampersands, and emoji can all break a URL if they're not encoded correctly. A URL encoder/decoder makes sure your links and query parameters travel safely across the web.

URL Encode & Decode Guide: Master Percent-Encoding
2min read
318words
2views
3topics
๐Ÿ”—Try the toolURL Encode / Decodeโ†’

Spaces, ampersands, and emoji can all break a URL if they're not encoded correctly. A URL encoder/decoder makes sure your links and query parameters travel safely across the web.

What is URL Encode & Decode Guide?

URL encoding (also called percent-encoding) replaces unsafe characters in a URL with a % followed by two hex digits โ€” for example, a space becomes %20. A URL encoder/decoder converts text to this safe form and back again.

How to use it

  1. Choose encode or decode mode.
  2. Paste your URL or text.
  3. Get the percent-encoded or decoded result instantly.
  4. Copy it, or parse a full URL to inspect its query parameters.

Key features

  • Encode & decode โ€” Convert special characters to %XX and back with one click.
  • Component vs full URL โ€” Choose encodeURIComponent for values or encodeURI for whole URLs.
  • Query parameter parsing โ€” Break any URL into protocol, host, path, query, and hash.
  • Unicode support โ€” Correctly handles accented characters and emoji as UTF-8.

Tips to get the most out of it

  • Encode each query parameter value separately โ€” never encode the whole URL including the & and = separators.
  • Use %20 (not +) for spaces in URL paths per RFC 3986.
  • Decode logged URLs to read tracking and UTM parameters.

Frequently asked questions

What is percent-encoding?

It replaces unsafe URL characters with a % and their hex code, e.g. space โ†’ %20.

encodeURI vs encodeURIComponent?

encodeURIComponent encodes structure characters like / ? & too; use it for values. encodeURI preserves them for whole URLs.

Why does my URL have %20 everywhere?

Those are encoded spaces โ€” decode the URL to see the readable version.

Is my data private?

Yes, all encoding and decoding happen in your browser.

Ready to try it? Open the tool and see your results instantly โ€” it's free, needs no login, and runs entirely in your browser.

#developer#web#tools
Gaurav SinghWritten byGaurav SinghView profile โ†’

More from the blog

Your BMI Was Invented by an Astronomer Who Never Meant It for Your Body

Body Mass Index runs modern medicine โ€” but it began as a 19th-century population statistic by a Belgian stargazer, was renamed by a heart researcher in 1972, and reclassified millions overnight in 1998. Here's the strange, true story.

8 min read

Base64 Isn't Encryption: What It Actually Does (and Why the Web Needs It)

It looks scrambled, so people assume it's secret โ€” but Base64 hides nothing. Here's what Base64 really is, how 3 bytes become 4 characters, why it's 33% bigger, and where it quietly runs the internet.

8 min read

Who Invented the Pomodoro Technique? The Tomato and the Science of Focus

The world's most famous focus method is named after a tomato-shaped kitchen timer. Here's the real story of the Pomodoro Technique โ€” why 25 minutes, Parkinson's Law, the 23-minute cost of interruption

8 min read