developer utility
URI Component Encoder
Encode a single URI component the same way JavaScript's encodeURIComponent() does — ideal for query parameter values.
Quick Answers
- When should I URL-encode a string?
- Encode any text before placing it inside a query string, path segment, or form submission if it contains reserved characters like spaces, &, =, ?, or non-ASCII characters — otherwise the receiving server may misinterpret the URL.
- What's the difference between encodeURIComponent and encodeURI?
- encodeURIComponent escapes nearly all reserved characters and is correct for encoding a single query parameter or path segment. encodeURI leaves characters like / and : untouched because it's meant for encoding a full URL, not a fragment of one.
- Does this tool send my data anywhere?
- No. Encoding and decoding run locally in your browser's JavaScript engine with zero network requests.
All decoding happens entirely in your browser. No data is ever sent to a server — nothing you paste here is transmitted, logged, or stored.
Frequently asked questions
When should I URL-encode a string?
Encode any text before placing it inside a query string, path segment, or form submission if it contains reserved characters like spaces, &, =, ?, or non-ASCII characters — otherwise the receiving server may misinterpret the URL.
What's the difference between encodeURIComponent and encodeURI?
encodeURIComponent escapes nearly all reserved characters and is correct for encoding a single query parameter or path segment. encodeURI leaves characters like / and : untouched because it's meant for encoding a full URL, not a fragment of one.
Does this tool send my data anywhere?
No. Encoding and decoding run locally in your browser's JavaScript engine with zero network requests.
Related tools