Free tool · runs in your browser

URL Encoder & Decoder

Turn text into a valid URL component, keep a whole URL intact, or read a percent-encoded string back into plain text.

Component vs full URL

encodeURIComponent() escapes every reserved character, including / ? : @ & = + #. That is what a single query value or path segment needs. encodeURI() leaves those structural characters alone, so it is only safe on an already well-formed URL.

Encoding a whole URL with the component function is the classic bug: the result no longer parses as a URL because the separators became %2F, %3F and %26.

Why spaces become %20 and sometimes +

Percent-encoding replaces a byte with % and two hex digits. A space is byte 0x20, hence %20. In application/x-www-form-urlencoded bodies and query strings parsed by HTML forms, a space is instead written as +; the two are not interchangeable in path segments, where + is a literal plus sign.

Non-ASCII text is encoded as UTF-8 bytes, so one character can become several %xx triples.

Frequently asked questions

Why does my encoded URL return 404?

Every slash and question mark was probably escaped, so the server received one long path segment. Re-encode only the values and leave the URL structure unchanged.

Does decoding touch HTML entities?

No. This tool only converts percent triplets. <code>&amp;amp;</code> and similar entities are a separate HTML concern.

Is URL encoding encryption?

No. It is a reversible transport encoding that anyone can decode; it hides nothing.

Embed this calculator on your site

Free to embed. The credit line is the only condition.

New tools, straight to your inbox

One short email when we add tools worth using. No spam, unsubscribe anytime.