Developer tool
URL Encoder and Decoder
Percent-encode and decode text or full URLs, with component and full-URL modes, plus a query-string parser and editor that rebuilds the link as you type.
Free, no sign-up. Runs in your browser; nothing is uploaded.
Options
Component mode encodes everything except letters, digits and - _ . ! ~ * ' ( ). Use it for a single query value or path piece.
Input
Result
How to use the url encoder and decoder
Encode, decode and edit URLs safely
URLs may only contain a limited set of characters. Anything else, from spaces to emoji, has to be written as percent escapes such as %20. Getting this wrong is a classic source of broken links, failed API calls and double-encoded values. This tool encodes, decodes and edits URLs while showing you exactly what changes.
Encode and decode
Pick a direction and a mode.
- Component mode is for one piece of a URL, such as a query value or a path segment. It escapes characters like & = ? # / so they cannot be mistaken for URL structure.
- Full URL mode is for an entire address. It leaves the structural characters alone and only escapes unsafe ones such as spaces and non-ASCII letters.
When decoding query strings, switch on "Treat + as a space" because HTML forms use plus signs for spaces.
The query-string editor
Paste a full URL or just the part after the question mark. The tool breaks it into decoded keys and values you can edit in a table, add to or remove. As you type, the rebuilt URL below is correctly encoded and ready to copy. The path, host and fragment are kept as they were. This is the fastest way to tweak tracking parameters, test an API call or remove clutter from a long link.
Rules worth remembering
- Encode values, not whole URLs, when building a query. Encode each value with component mode and join them with & and =.
- Never encode twice. If you see %2520 the percent sign itself was encoded; decode once.
- Reserved characters : / ? # [ ] @ ! $ & ' ( ) * + , ; = have meaning in a URL. Encode them inside values.
- Unreserved characters letters, digits and - . _ ~ never need encoding.
- Spaces become %20 in paths and either %20 or + in query strings.
Troubleshooting
If a link works in the browser but fails in code, compare the encoded forms. If a redirect URL loses its parameters, the inner URL probably needs component encoding before it is placed in another URL.
Frequently asked questions
What is the difference between component and full URL mode?
Component mode (encodeURIComponent) encodes everything except letters, digits and a few marks, so it is right for a single value. Full URL mode (encodeURI) keeps characters such as : / ? & = that structure a URL.
Why did my + turn into a space or the reverse?
In form data and many query strings a plus sign means a space, while in a path it is a literal plus. Use the "Treat + as a space" option when decoding query strings.
Why does decoding fail?
A percent sign must be followed by two hex digits, and the bytes must form valid UTF-8. A stray % in the input or a truncated sequence like %E2%82 will fail.
How are non-English characters encoded?
They are converted to UTF-8 bytes and each byte is written as %XX, so an accented letter becomes two escapes and a Euro sign becomes three.
Does the query editor change the order of parameters?
No. Parameters keep their order, repeated keys stay repeated, and the rebuilt URL re-encodes every key and value correctly.
Is my URL sent anywhere?
No. Everything is computed in your browser.