Tip: Press Ctrl+Enter to run
URL Encoder / Decoder
URL encoding (percent-encoding) converts characters that are not allowed in URLs into a %XX hex format.
For example, a space becomes %20 and an ampersand becomes %26.
Use Component mode for individual query string values (encodes & = + ?),
or Full URL mode to encode a complete URL while preserving its structure.
All processing runs locally in your browser.
What this tool does
URLs can only safely contain a limited set of ASCII characters. Spaces, ampersands, equals signs, and non-ASCII text must be percent-encoded — replaced with % followed by two hex digits — to be transmitted correctly. This tool encodes or decodes URL strings entirely in your browser. Nothing is sent to a server.
How to use it
- Select Encode or Decode and paste your URL or query string value.
- Click Process or press Ctrl+Enter.
- Use Swap to move the output back into the input for chained operations.
- Refer to the quick reference table in the tool for common character mappings.
Characters that need encoding and why
- Space →
%20— Spaces are not valid in URLs. &→%26— Separates query parameters. Literal ampersands in values must be encoded.=→%3D— Separates keys from values. Encode when it appears inside a value.+→%2B— Treated as a space in form-encoded query strings. Encode when you mean a literal plus sign.#→%23— Marks the fragment; everything after it never reaches the server.- Non-ASCII — UTF-8 encoded first, then each byte percent-encoded. "café" becomes
caf%C3%A9.
Frequently Asked Questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a complete URL, leaving structural characters (/, ?, &, #) intact because they're needed for the URL to function. encodeURIComponent encodes a single value — a query parameter or path segment — and encodes those structural characters too. For dynamic values going into query strings, always use the component variant.
What is double-encoding and how do I avoid it?
Double-encoding happens when you encode something that's already encoded — turning %20 into %2520 because % gets encoded to %25. The fix: only encode once, just before the URL is used. If you receive an already-encoded URL, decode it first before re-encoding.
Why does a + in a decoded URL show up as a space?
HTML form submissions use application/x-www-form-urlencoded format, where spaces become + rather than %20. Server-side form parsers decode + as a space. Standard percent-encoding uses %20 for spaces. Mixing the two conventions in the same query string causes this confusion.
Want the full explanation? Read the guide: Why URL Encoding Trips Up So Many Developers →