URL Encoder and Decoder
Encode text so it survives inside a URL, or decode a percent-encoded URL back into something readable. Two modes, because encoding a whole URL and encoding one parameter inside it are different jobs with different rules.
- Free, no sign-up
- Runs in your browser
- Nothing uploaded
- Updated Sep 2026
At a glance
- Modes
- Component (one value) and full URL
- Standard
- RFC 3986 percent-encoding
- Encoding
- UTF-8, so any script encodes correctly
- Also shows
- Every query parameter, decoded individually
- Processing
- Entirely client-side
- Cost
- Free, no account
Component or full URL — the distinction that matters
Getting this wrong is the source of most URL encoding bugs, and the two modes exist because they encode different character sets.
Component encoding escapes everything that is not an unreserved
character, including /, ?, &, = and
:. Use it for a single value being placed into a URL — a search term, a
redirect target, a filename. In JavaScript this is encodeURIComponent().
Full-URL encoding leaves the structural characters alone, because they
are doing their job as separators, and escapes only spaces, non-ASCII characters and a few
others. Use it on a complete URL you want to tidy. In JavaScript this is
encodeURI().
The classic bug: taking a redirect URL and encoding it with full-URL mode. The
? and & survive unescaped, so when the whole thing is placed
into another URL's query string, the receiving server reads your redirect target's parameters
as its own. The result is a link that silently drops half its data — and on a login redirect,
an open redirect vulnerability. A value going inside a URL always needs component
encoding.
Double encoding and how to spot it
Double encoding happens when already-encoded text is encoded again. A space becomes
%20, then the % itself gets encoded to %25, producing
%2520. The link still looks plausible and no longer works.
It is nearly always caused by a value passing through two layers that each try to be
helpful — a framework that encodes automatically, plus an application that encodes again
before handing it over. The symptom is literal %20 text appearing on a page, or
a search for hello world returning results for hello%20world.
This tool flags input containing %25 followed by hex digits, which is the
signature. The fix is architectural rather than textual: find which layer is encoding and
stop the other one doing it too. Decoding twice to "fix" the symptom leaves the real bug in
place, and it will produce a different broken URL the next time the input contains a literal
percent sign.
The plus sign, and other historical oddities
A space can be encoded as %20 or as +, and which is correct
depends on where in the URL you are.
+ for space comes from the application/x-www-form-urlencoded
format used by HTML form submissions. It is valid in a query string and invalid in a path —
in a path, + is a literal plus sign. So /search?q=hello+world means
"hello world", while /files/hello+world.txt means a file with a plus in its
name.
Because servers differ in how strictly they apply this, %20 is the safer
choice everywhere: it means a space in every position, unambiguously. This tool encodes
spaces as %20, and decodes + as a space only in query-string
context.
Two more worth knowing. The characters -, ., _ and
~ are unreserved and never need encoding — a tool that escapes them is being
over-cautious and producing uglier URLs than necessary. And the fragment after #
is never sent to the server, so encoding it matters only for the client.
How to use the URL Encoder & Decoder
-
Choose encode or decode
The tool guesses from the input — text containing
%escapes is assumed to be encoded — but you can override it. -
Pick the right mode
Component for a single value going into a URL. Full URL for tidying a complete address. When in doubt, and the text is going inside a URL, use component.
-
Check the parameter breakdown
If you pasted a full URL, each query parameter is listed and decoded individually, which is usually the fastest way to see what a long URL actually contains.
-
Watch for the double-encoding warning
If it appears, the real fix is in your code — find which layer is encoding twice rather than decoding the symptom away.
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURIComponent escapes everything including /, ? and &, which is right for a single value going into a URL. encodeURI leaves those structural characters intact, which is right for a complete URL. Using the wrong one on a redirect parameter is a common and occasionally serious bug.Should a space be %20 or +?
%20 is safe everywhere. + means a space only in a query string, and means a literal plus sign in a path. Since servers vary in strictness, %20 avoids the ambiguity entirely.Why does my URL contain %2520?
It has been encoded twice — a space became %20, then the % became %25. Find which layer of your stack is encoding redundantly. Decoding twice to patch it leaves the underlying bug in place.
Do I need to encode non-English characters?
Browsers display them readably and encode them on the wire, so a URL with Arabic or Chinese characters works. Once copied, it becomes long percent-encoded text. For a link people will share, transliterated ASCII in the path is usually more practical — the slug generator handles that.
Which characters never need encoding?
Letters, digits, and the four unreserved marks -, ., _ and ~. Anything else either has structural meaning or needs escaping depending on position.
Is URL encoding a security measure?
No. It ensures data survives transport intact, nothing more. It does not sanitise input and provides no protection against injection — validate and escape according to where the data is actually going, whether that is SQL, HTML or a shell command.