URL Encoder & Decoder

Encode plain text to percent-encoded format or decode %XX strings back to readable text. Component or full-URL mode. Space as %20 or +. URL parser breaks any URL into its parts and decodes every query parameter.

url-encoder.tool
Mode:
Space:
Text to Encode
Encoded Output
Quick Examples
url-parser.tool

Component vs Full URL Mode

This is the question developers get confused about most. Component mode uses encodeURIComponent — it encodes everything except letters, digits, and - _ . ! ~ * ' ( ). This is what you want for encoding a single value that will be placed inside a URL, like a search term or a parameter value.

Full URL mode uses encodeURI — it preserves characters that have structural meaning in a URL: : / ? # [ ] @ ! $ & ' ( ) * + , ; =. Use this when encoding an entire URL that is already properly structured and you only want to fix unsafe characters.

For example, encoding https://example.com/path?q=hello world in Full URL mode gives https://example.com/path?q=hello%20world (structure preserved). In Component mode it gives https%3A%2F%2Fexample.com%2Fpath%3Fq%3Dhello%20world (everything encoded, URL broken).

%20 vs + for Spaces

There are two valid ways to encode a space in a URL. %20 is the standard per RFC 3986 and works everywhere. + is used in application/x-www-form-urlencoded format — this is what HTML forms send, and what PHP's $_GET and $_POST parse. If you are encoding form data or query strings to be parsed by a web server, + is fine. If you are encoding a URL component for any other use, use %20.

URL Parser

Paste any URL into the parser panel to instantly see every component — protocol, host, port, path, hash — and every query parameter decoded into a readable key-value table. Useful for debugging redirect URLs, OAuth callback URLs, and any URL that has been encoded multiple times.

Frequently Asked Questions

encodeURIComponent encodes everything except letters, digits, and a few punctuation marks. It is meant for encoding a single value that goes inside a URL. encodeURI encodes everything except characters that have structural meaning in URLs (: / ? # @ etc.). It is meant for encoding a complete URL. Using encodeURIComponent on a full URL breaks it by encoding the colons and slashes. Using encodeURI on a parameter value fails to encode characters like & and = that would break the query string structure.
Use + when encoding form data that will be submitted to a web server and parsed as application/x-www-form-urlencoded — this is how HTML form submissions work, and PHP, Django, Rails and most web frameworks parse the + back to a space in query string parameters. Use %20 everywhere else: in paths, in values that go through multiple encoding steps, and in any context that is not a form submission. When in doubt, %20 is always safe. + as a space only works in the query string, never in the URL path.
You probably used Component mode on a full URL. Component mode (encodeURIComponent) is intended for encoding a single value, not an entire URL — it encodes the : and // in https://, making the URL unrecognisable. Switch to Full URL mode to encode a complete URL while preserving its structure. If you are encoding a parameter value that happens to contain a URL, Component mode is correct.
It treats each line of input as an independent value and encodes them separately, producing one encoded result per line. This is useful for batch encoding a list of values — email addresses, search terms, API parameters — all at once rather than one at a time.
Paste it into the decoder and click Swap after each decode to run it through again. Some systems double-encode URLs (encode an already-encoded URL), resulting in %2520 instead of %20 (where %25 is the encoding of %). Keep decoding until the output stabilises and no more percent sequences remain. The URL parser also helps here — it uses the browser's native URL parser which handles most common encoding variations.