What is URL Encoder & Decoder?
URL encoding (percent-encoding) replaces unsafe characters — spaces, non-ASCII letters like Chinese, and reserved symbols such as & and = — with a percent sign followed by two hexadecimal digits, so they can travel safely inside a URL.
Component mode (encodeURIComponent) escapes every reserved character and is meant for query parameter values. URI mode (encodeURI) keeps URL structure characters such as :// and ? intact and is meant for complete URLs. Choosing the right mode is the most common source of encoding bugs.
Frequently asked questions
Which mode should I use?
Use Component mode for query parameter values — it escapes & = ? which would otherwise break the parameter structure. Use URI mode only when encoding a complete URL that should keep its separators.
What does %20 mean?
It is the encoded form of a space. Spaces are not allowed in URLs, so they must be percent-encoded as %20.
Is the plus sign (+) the same as %20?
Only in form-encoded query strings (application/x-www-form-urlencoded), where + historically means a space. In URL paths, + is a literal character and %20 is the space.