Skip to content
HNarzędzia
en
Categories

URL encode and decode online - percent-encoding and URL parser

Percent-encode query values or whole addresses, decode %XX sequences back to readable text, and break a URL into its parts with a table of query parameters. Everything runs in your browser.

  • Free
  • No sign-up
  • Private
  • Runs locally

Encode and decode

encodeURIComponent - for parameter values: also encodes / ? & = # :

URL parser

How to URL-encode or decode text

  1. 1.

    Choose the mode

    “Encode component” for a single parameter value, “Encode full URL” for an entire address, or “Decode” to turn %XX back into characters.

  2. 2.

    Paste the text

    The result appears instantly. Optionally treat spaces as “+”, as HTML forms do.

  3. 3.

    Parse a URL

    Paste a full address into the URL parser to see the protocol, host, port, path, fragment and every query parameter decoded.

How percent-encoding works

A URL may only contain a limited set of ASCII characters (RFC 3986). Every other character is converted to UTF-8 bytes, and each byte is written as % followed by two hexadecimal digits. Accented letters take 2 bytes, the euro sign 3 and emoji 4:

CharacterEncoded
space%20 (or + in forms)
é%C3%A9
ü%C3%BC
€%E2%82%AC
😀%F0%9F%98%80
&%26
/%2F
?%3F
#%23

Example: the search phrase “winter boots & café” as a parameter value becomes winter%20boots%20%26%20caf%C3%A9.

encodeURIComponent vs encodeURI

  • encodeURIComponent encodes everything except A-Z a-z 0-9 - _ . ! ~ * ' ( ). Use it for single values - query parameters and path segments - so that an & inside a value does not split it into two parameters.
  • encodeURI additionally keeps the URL structure characters ; , / ? : @ & = + $ #. Use it to clean up a complete address that contains spaces or non-ASCII letters.

The classic bug is using encodeURI on a parameter value: ?q= + encodeURI("a&b") yields ?q=a&b - two parameters instead of one. In modern code, URLSearchParams and the URL class handle encoding for you.

Anatomy of a URL

https://user:pass@shop.example.com:8080/boots/winter?color=black&size=42#reviews

  • protocol: https:
  • credentials: user:pass (deprecated, browsers warn about it)
  • host: shop.example.com, port: 8080 (default 443 for https, 80 for http)
  • path: /boots/winter
  • query string: ?color=black&size=42 - key=value pairs separated by &
  • fragment: #reviews - never sent to the server

Internationalised domain names such as bücher.de are stored in Punycode (xn--bcher-kva.de), and the parser shows that form.

Common mistakes

  • Double encoding - encoding already encoded text turns % into %25, so %C3%A9 becomes %25C3%25A9. If you see %25 in a link, decode it first.
  • Space as + or %20 - HTML forms (application/x-www-form-urlencoded) use +, URL paths use %20. A plus in a path is a literal “+”.
  • Legacy encodings - old systems wrote “é” as %E9 (ISO-8859-1). That is not valid UTF-8, so the decoder reports an error instead of guessing.
  • Non-ASCII page addresses - for page URLs it is better to avoid accents altogether; create a clean, readable address with the slug generator.

Frequently asked questions

What does %20 mean in a URL?

+
%20 is an encoded space (byte 0x20). Spaces are not allowed in URLs, so browsers replace them with %20, while HTML forms use the + sign.

How do I decode a link full of %C3 and similar codes?

+
Choose “Decode” and paste the link. UTF-8 sequences are turned back into readable characters - %C3%A9 becomes “é”.

Does + always mean a space?

+
Only in query strings encoded like HTML forms (application/x-www-form-urlencoded). In a path, + is a literal plus sign. Turn on “Treat + as space” when decoding form data.

Why do I get a “malformed percent sequence” error?

+
Either a % is not followed by two hex digits (as in “100%”), or the bytes do not form a valid UTF-8 character. A literal percent sign must be encoded as %25.

Should I use encodeURI or encodeURIComponent?

+
Use encodeURIComponent for individual values such as query parameters. Use encodeURI only for a complete URL whose structure (/, ?, &, #) must stay intact.

Are my URLs sent to a server?

+
No. Encoding and parsing use your browser’s built-in encodeURIComponent and URL APIs, so links with tokens stay private.

Updated: