Developer Tools

URL Encoder & Decoder

Percent-encode URLs and text or decode them back: encodeURIComponent vs encodeURI scopes, %20 vs + spaces, double-encoding detection, URL parts breakdown and a query-string builder, all in your browser.

Your result will appear here.

Input: 0 characters

Build a query string

🔒 Privacy: encoding runs locally in your browser. Nothing you paste is uploaded or logged.

More developer tools

How this calculator works

A URL can only carry a limited set of characters. Anything outside that set, or with a structural job in the address, has to be written as a percent sequence before the link is safe to send: a space becomes %20, an ampersand becomes %26, a question mark becomes %3F, and non-ASCII text is encoded as UTF-8 bytes first, so café becomes caf%C3%A9. This tool encodes text and URLs and decodes them back, entirely in your browser. Paste a value, pick Encode or Decode, and copy the result.

The choice that trips most people up is scope. Encode a single value (encodeURIComponent) when it sits inside a URL: a search term, a redirect target, a path segment. It escapes the structural characters too, so https://example.com/search?q=hello world&lang=en as one value becomes https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world%26lang%3Den, which is exactly right as a parameter value and exactly wrong as a clickable link. Encode a whole URL (encodeURI) when the address must stay clickable: it keeps : / ? & = # intact and only fixes spaces and non-ASCII characters, so the same example stays https://example.com/search?q=hello%20world&lang=en. Worked example: the value "hello world & friends?" encodes to hello%20world%20%26%20friends%3F in value mode.

Two more traps are worth knowing. Spaces have two spellings: %20 is standard percent-encoding and safe everywhere, while + means a space only in HTML form data (application/x-www-form-urlencoded), so a literal plus sign must arrive as %2B or it silently becomes a space. And if a decoded string still shows %20 or %25, it was encoded twice, usually because an encoder ran over an already-encoded value; decode again to resolve it, then fix the step that doubled it. The query-string builder at the bottom of the tool handles the form-encoding rules for you, and the URL parts breakdown shows what a pasted address actually contains, which is the fastest way to read a suspicious redirect or tracking link.

Frequently asked questions

What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent encodes one value inside a URL and escapes structural characters like / ? & = : #, so the value cannot break the address around it. encodeURI encodes a whole URL and keeps those structural characters, fixing only spaces and non-ASCII characters. Use the first for a parameter value or path segment, the second for a complete clickable address.
Should a space be %20 or +?
%20 is standard percent-encoding and safe everywhere. + means a space only in HTML form data (application/x-www-form-urlencoded), which is what browsers send from forms and what URLSearchParams produces. In a path or a plain link, use %20; in a query string built by a form, + is also correct.
Why does my decoded URL still show %20?
It was encoded twice: an encoder ran over an already-encoded value, turning %20 into %2520. Decode once to get %20, decode again to get the space, then fix the step that encoded it twice. This tool flags double-encoded input automatically.
Why did my decode fail?
Usually a bare % not followed by two hex digits, for example a literal "50% off" that was never encoded, or text assembled by string concatenation instead of a real encoder. A lone % in a URI-encoded component also fails: encode it as %25 first.
How do I read the parameters inside a long URL?
Paste the URL into the tool: the query-parameters section lists every decoded key and value in order, including duplicates. That is the fastest way to check what a redirect, analytics or webhook link actually carries.
Is anything I paste uploaded?
No. Encoding and decoding run locally in your browser with the platform encode and decode functions. Nothing is sent to a server, stored, or logged, so pasting a token-bearing URL or log line stays private to your machine.
Disclaimer: Results are estimates for planning purposes only and are not financial advice. Actual loan terms, taxes and investment returns vary. Consult a qualified professional before making financial decisions.