URL Encode
Make any text safe for a URL: encode a single parameter value, a complete URL, or form data with + for spaces.
- Runs in your browser
- Free, no sign-up
What this tool gives you
Three encoding modes
Component, full URI or form style, matching JavaScript and PHP behaviour.
UTF-8 correct
Non-ASCII characters are encoded as their UTF-8 bytes, as RFC 3986 requires.
One-click copy
Grab the result for your query string or curl command.
Frequently asked questions
Which mode should I pick?
Use Component for a single value you will place in a query string. Use Whole URL when you have a complete address with slashes and a scheme that must survive.
What is the difference from PHP urlencode?
PHP urlencode() produces form encoding with + for spaces, matching the Form mode here. rawurlencode() matches Component mode.
Why are some characters not encoded?
Letters, digits and - _ . ~ are unreserved in RFC 3986 and never need encoding. Whole-URL mode also keeps : / ? # & = intact.
Can I encode a full URL safely?
Yes, choose Whole URL. Encoding a complete address in Component mode would also encode the slashes and break the link.