URL
URL Encode
Encode text for URLs using either full-URI mode or component mode, depending on whether reserved URL separators should remain readable.
Runs locally in your browser. Your input is not uploaded.
How this tool works
URL encoding converts characters into percent-encoded sequences when they are unsafe or ambiguous in URLs.
The two modes behave differently for reserved characters, so the tool keeps the mode visible.
Examples
- Encode a query parameter value that contains spaces and ampersands.
- Encode a full URL while preserving its separators.
Common use cases
Query strings
Redirect URLs
API testing
FAQ
When should I use encodeURIComponent?
Use it for query parameter values or path segments where separators should be escaped.
When should I use encodeURI?
Use it for a complete URL when characters like : / ? & should remain part of the URL syntax.