How to use the URL Encoder / Decoder tool
- Paste your text or URLEnter the text to encode, or an encoded URL to decode.
- Pick the encoding type“Component” for a single query value or path segment; “Full URL” to keep characters like : / ? & = intact.
- Encode or decodeClick the button you need. Tick “Spaces as +” for HTML form data.
- Copy or inspectCopy the result. When you decode a full URL, its protocol, host, path and query parameters are listed in a table.
Features
- Two encoding modesMatches JavaScript’s encodeURIComponent and encodeURI, the two functions developers use most.
- Strict RFC 3986Component mode also encodes ! ' ( ) *, which some servers treat specially.
- Form encodingConvert spaces to + and back, as used by application/x-www-form-urlencoded.
- URL breakdownRead every query parameter of a long tracking or API URL at a glance.
- Unicode supportNon-English text and emojis are encoded as UTF-8 bytes.
What is URL encoding?
URLs can only contain a limited set of characters: letters, digits and a few symbols such as - _ . ~. Other characters, including spaces, accented letters and symbols that have special meaning in a URL (like ?, & and #), must be percent-encoded. Each byte is written as a % followed by two hexadecimal digits. A space becomes %20, & becomes %26 and é becomes %C3%A9 (its two UTF-8 bytes).
Component vs full URL encoding
| Mode | Encodes | Use it for |
|---|---|---|
| Component | Everything except letters, digits and - _ . ~ | A single query parameter value, a path segment, a filename |
| Full URL | Spaces and unsafe characters, but keeps : / ? # & = + | A complete URL that already has the right structure |
Example: to put tea & coffee into ?q=, encode it as a component: tea%20%26%20coffee. If you used full-URL mode, the & would be left as is and the server would think a new parameter starts there.
%20 or +?
Both can represent a space, but in different places. In the query string of HTML form submissions (application/x-www-form-urlencoded), spaces are written as +. Everywhere else in a URL, including paths, a space must be %20. Tick “Spaces as +” only when you are working with form data.
Common problems this tool helps with
- Double encoding:
%2520in a URL means a%20was encoded again. Decode twice to get the original text. - Broken links: URLs copied from documents can contain raw spaces or special characters. Encode them in full-URL mode.
- Reading tracking links: decode long marketing or redirect links to see where they really go and which UTM parameters they carry.
- “URI malformed” errors: a lone
%not followed by two hex digits cannot be decoded. Replace it with%25.