URL Encoder
Make any text safe to put in a URL. Encode a single query value or path segment, or a whole URL with spaces and non-English characters, and inspect its parts.
Runs in your browser — nothing is uploaded Free, no limits
Text or URL to encode
Result
Output appears here.How to use the URL Encoder
- Paste the text or URL you want to encode.
- Choose "Component / value" for a query value or path segment, or "Full URL" for a complete address.
- Tick "Spaces as +" if the value goes into an HTML form body or a query string that expects form encoding.
- Copy or download the encoded result; full URLs are broken down in the URL parser below.
Frequently asked questions
What is URL encoding?
URL encoding (percent-encoding) replaces characters that aren't allowed in a URL with a % followed by two hex digits of their UTF-8 bytes. A space becomes %20 and "é" becomes %C3%A9.
encodeURIComponent vs encodeURI — which should I use?
Use encodeURIComponent ("Component / value") for a single piece such as a query parameter value; it also encodes / ? & = # so they can't break the URL. Use encodeURI ("Full URL") only for a complete URL, because it leaves those structural characters in place.
Should spaces be %20 or +?
Both are common. %20 is valid everywhere in a URL. The + sign means a space only in application/x-www-form-urlencoded data — HTML form submissions and most query strings — so use "Spaces as +" only there.
Which characters are not encoded?
encodeURIComponent leaves letters, digits and - _ . ! ~ * ' ( ) unchanged. RFC 3986 treats ! ' ( ) * as reserved, so tick the RFC 3986 option if a strict API (for example OAuth signatures) requires them encoded too.
Is my data sent anywhere?
No. Encoding runs entirely in your browser; nothing you paste is uploaded or stored.