URL Decode & Encode

Turn %20, %3D and friends back into readable text, or encode a value so it is safe inside a URL. Full URLs are split into their parts.

Input

Decoded

URL parts

Schemehttps
Hostcodeclean.dev
Path/search

Query parameters (3)

NameValue (decoded)
qjson formatter & validator
langen-GB
redirect/diff-checker?view=unified

Percent-encoding in short

URLs may contain only a limited set of ASCII characters. Anything else — spaces, &, =, non-English letters — is written as % followed by the byte’s two hex digits in UTF-8. A space becomes %20 (or + in form data), é becomes %C3%A9.

Component vs. full URL encoding

  • Component (encodeURIComponent) encodes everything except letters, digits and -_.!~*'(). Use it for a single query value.
  • Full URL (encodeURI) keeps : / ? & = # so the URL’s structure survives. Use it for a whole URL that contains spaces.

Questions

Why is + turned into a space?

HTML forms encode spaces as +. The decoder treats + as a space, which is right for query strings. A literal plus in a query value should be sent as %2B.

What does “malformed percent-encoding” mean?

A % is not followed by two hex digits, or the bytes do not form valid UTF-8. The error shows the position.

Related tools