URL Encoder
Encoding & EscapingPercent-encode text or a full URL
Plain text
Encoded
https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world%26lang%3Den
About the URL Encoder
A URL/percent encoder that updates live as you type. Switch between Component encoding (encodeURIComponent — escapes everything, for a single query value) and Full URL encoding (encodeURI — preserves reserved characters like : / ? &, for encoding a complete URL).
Percent-encoding trips people up constantly because the two JavaScript functions behave differently on purpose — using the wrong one either double-escapes a full URL's structure or fails to escape a query parameter's special characters. Having both side by side, with live output, makes it obvious which one you actually need.
How to Use the URL Encoder
Type or paste text or a URL into the input field.
Toggle between Component and Full URL modes to match what you're encoding.
Copy the percent-encoded output.
Frequently Asked Questions
Is my text sent anywhere?
No. Encoding happens entirely in your browser using standard JavaScript — nothing you type is sent to a server.
What's the difference between Component and Full URL encoding?
Component (encodeURIComponent) escapes every character that isn’t URL-safe, including &, ?, /, and : — use it for a single value like a query parameter. Full URL (encodeURI) leaves those reserved characters alone since they’re structurally meaningful in a complete URL, and only escapes things like spaces — use it when encoding an entire URL rather than one piece of it.
Why would I encode a whole URL versus just a query parameter?
If you're building a query string value to embed inside an existing URL — a search term, a redirect target — encode just that value with Component mode before inserting it. If you have a complete URL that contains unsafe characters (like a space) and needs to stay a valid URL, use Full URL mode so its structure isn't broken.
What happens if I encode an already-encoded string?
It gets double-encoded — a literal "%" in the input becomes "%25", so a string that was already percent-encoded ends up doubly escaped. Only encode plain, unencoded text.