How to use the URL encoder
- Pick what you are encoding, or choose Decode.
- Type or paste into the first box; the result updates as you type.
- Copy the result, or choose Use as input to reverse it. When the text is a full URL, its parts and decoded query parameters are listed below the result.
A component or a full URL?
Percent-encoding replaces characters with % and two hexadecimal digits per UTF-8 byte: a space becomes %20, é becomes %C3%A9.
- Encode a component (JavaScript’s
encodeURIComponent) is for one piece that goes inside a URL: a query parameter’s value, a path segment. It escapes/ ? # & =too, so the value cannot break the URL around it. This is the one you usually want. - Encode a full URL (
encodeURI) keeps the characters that give a URL its structure (: / ? # & =) and escapes only what is not allowed, such as spaces and non-ASCII letters. Use it on a whole address that is already put together, and never on a value, because an&inside the value would start a new parameter. - Encode a form value follows the rules HTML forms and
URLSearchParamsuse (application/x-www-form-urlencoded): spaces become+.
Strict RFC 3986 also escapes ! ' ( ) *, which encodeURIComponent leaves alone but some signing schemes (OAuth 1.0, AWS Signature V4) require.
Decoding and malformed input
Decoding turns %XX sequences back into text, and + into a space when that option is on (correct for query strings, wrong for paths). A % that is not followed by two hexadecimal digits, or bytes that do not form valid UTF-8 (for example %E9, which is é in the older Latin-1 encoding), are reported with their position instead of a generic “URI malformed”.
Everything happens in your browser: nothing you type here is sent to this site.