URL encoder & decoder

Convert between URLs and percent-encoding both ways, with URI component / full URL modes, and break query parameters into a table.

Encoding mode
Input (plain text or %XX encoded string)
Result
—
Enter content, then click Encode or Decode.
Query parameter parsing (split ?a=1&b=2 into a table)
Supports full URLs or plain query strings; parameters are decoded automatically (readable output).

The parts of a URL

ComponentExampleEncoding notes
SchemehttpsNever encoded
Hostexample.comUse Punycode for non-Latin domains
Port443Digits only
Path/docs/pageEncode each segment; / is significant
Query?q=hello worldEncode names and values separately
Fragment#sectionNot sent to the server

Reserved versus unreserved characters

Unreserved characters — letters, digits, and -, _, ., ~ — never need encoding. Everything else becomes a percent sign followed by two hex digits: a space is %20, a slash is %2F when it is meant as data rather than as a separator. The reserved set (: / ? # [ ] @ ! and others) has structural meaning, so encoding it changes the URL's interpretation.

Space: %20 or +?

Both appear, and they are not interchangeable. In the path, a space must be %20. In a query string submitted as form data, + is the traditional encoding for a space — which is exactly why a literal plus sign inside a query value must itself be encoded as %2B. Sending a raw + where a space is expected, or the reverse, is one of the most common causes of a mysteriously altered search term.

Double encoding

If a value is encoded and then passed through a system that encodes it again, %20 becomes %2520 and arrives as literal text. Always establish which layer is responsible for encoding — usually the client, once — and make sure nothing downstream repeats it.

Fragments and encoding are separate concerns

The fragment is handled by the browser and is never transmitted, so it does not need transfer encoding — but characters significant to the page's own routing may still need escaping. And because the fragment survives redirects and is used by single-page applications, malformed encoding there can break navigation without ever reaching the server logs.

Related tools

Base64 encoder HTML entities QR code generator

FAQ

What is URL encoding (percent-encoding) for?
Only a limited set of ASCII characters is safe in URLs. Characters such as spaces, & # ? must be converted to a % sign followed by two hex digits — this is URL encoding (urlencode). Browsers and servers decode it back automatically.
What is the difference between URI component and full URL modes?
URI component mode (encodeURIComponent) also encodes separators like / : ? & = #, which is right for encoding a single parameter value. Full URL mode (encodeURI) keeps those separators, which is right for encoding an entire URL.
What does the + sign mean in a URL?
In query strings, + is often treated as a space, while standard encoding uses %20 for spaces. This tool decodes %XX escapes by the standard rules and, when parsing query parameters, follows the common form convention that reads + as a space.
Is my URL uploaded when parsing parameters?
No. Encoding, decoding and parameter parsing all run locally in your browser. The URL is never sent to any server (and the tool never visits that URL).