Runs in your browser · Last updated 4 September 2026
URL Encode Decode
encodeURIComponent and decode percent-encoded query text locally. No request is made.
encodeURIComponent
https%3A%2F%2Fexample.com%2Fq%3Fa%3D1%20%26%20b%3Dtwo
Decoded (if the box is already encoded)
https://example.com/q?a=1 & b=two
How to use this tool
- Paste a query value or a percent-encoded string.
- Read both the encoded and decoded boxes.
- Copy the one you need.
Worked example
The sample URL has a space and an ampersand. encodeURIComponent turns them into %20 and %26 so a query parser does not split the value.
Frequently asked questions
- encodeURI vs encodeURIComponent?
- This page uses encodeURIComponent so &, =, and spaces become percent sequences. That is what query values need.
- Uploaded?
- No.
- Plus signs?
- On decode, + is treated as a space, which matches form bodies.
- UTM?
- Build campaign URLs on the UTM generator. Encode a single value here.
- Invalid %?
- decodeURIComponent throws; the tool shows that instead of crashing.