URL Encoder & Decoder — Guide
Encode text to URL-encoded format (also known as "percent-encoded"), or decode from it.
What it is and when to use it
Percent-encoding (URL encoding) replaces characters that would break a URL — spaces, &, ?, #, +, non-ASCII text — with a % followed by the byte's hex value, so a space becomes %20 and 王 becomes %E7%8E%8B. This tool uses the browser's encodeURIComponent, the same function your backend frameworks call, so its output matches what production code produces. The single most common mistake is scope: encoding a complete URL escapes the :// and ? that make it a URL. Encode values, then concatenate them into the URL — that is what "only encode the parameter values" in the notes means.
Encodes a string into percent-encoded form, or decodes it back — avoids the classic pitfalls when building query strings.
How to use it
- Paste the raw or already-encoded string
- Click encode or decode
- Copy the result
A worked example
Fill in sample text
https://example.com/search?q=hello world&page=1
Copy this into the tool, or open URL Encoder & Decoder
Things that trip people up
- Encoding a whole URL also escapes the :// — normally you should only encode the parameter values
Questions people ask
- What is the difference between %20 and +?
- Both historically mean "space" in a query string, but they belong to different encodings: %20 comes from percent-encoding, + is an application/x-www-form-urlencoded convention. encodeURIComponent produces %20. Some servers treat + literally, so when in doubt use %20 and test against the real endpoint.
- Why is my decoded string full of %EF%BF%BD or garbage characters?
- That byte sequence is U+FFFD, the replacement character: the text was already corrupted before encoding, typically by being stored or transmitted in the wrong charset. Percent-encoding preserves bytes, not meaning — fixing it requires finding where the encoding was first mismatched.
- Should I encode the whole URL or just the parameter values?
- Only the values. Encoding a full URL turns https:// into https%3A%2F%2F and destroys its structure. Build the URL first, then encode each value you insert into it — or encode the complete URL only when it is itself a value of another parameter (a redirect target, for example).
Next steps
Open the URL Encoder & Decoder tool
- URL parser
- Outlook SafeLink Decoder
- Slugify string
- Escape HTML entities
- Device information
- Basic auth generator
Spotted something wrong on this page? Tell us via Contact Us