URL Encoder
Encode or decode URL / query string values
About URL Encoder
URL encoding (percent encoding) replaces unsafe ASCII characters in URLs with a "%" followed by two hexadecimal digits. Spaces become %20, ampersands become %26 and so on. This free URL Encoder/Decoder tool instantly converts any text to a URL-safe format or decodes percent-encoded strings back to readable text — essential for developers building APIs, web forms and redirect links.
How to Use URL Encoder
- 1Choose "Encode" to percent-encode special characters, or "Decode" to reverse the process.
- 2Paste the URL or query string into the input field.
- 3The encoded or decoded output appears instantly below.
- 4Click "Copy" to copy the result.
Common Use Cases
Use URL encoding for query string values only — never encode the full URL including slashes and colons, or your URL will break.
⭐ Popular Free Tools
Frequently Asked Questions
Which characters need to be URL encoded?
Characters that must be encoded in query strings include: space (→ %20), & (→ %26), = (→ %3D), + (→ %2B), # (→ %23), ? (→ %3F), / (→ %2F), and any non-ASCII characters. Alphanumeric characters and - _ . ~ are safe and do not need encoding.
What is the difference between encodeURI and encodeURIComponent in JavaScript?
encodeURI encodes a full URL but leaves structural characters like /, ?, # and & unencoded. encodeURIComponent encodes everything including those characters, making it suitable for encoding individual query parameter values. Use encodeURIComponent for parameter values, encodeURI for full URLs.
Why are spaces sometimes encoded as + instead of %20?
In HTML form data (application/x-www-form-urlencoded), spaces are encoded as + signs. In standard URL percent encoding (RFC 3986), spaces are encoded as %20. Most modern APIs use %20. If your URL comes from a form POST, you may see + signs that need to be decoded as spaces.
Can I URL encode a full web address?
You should only URL encode individual query parameter values, not the entire URL. Encoding the full URL (including http://, slashes and dots) will break it. For example: https://example.com/search?q=hello world → the value "hello world" should be encoded as "hello%20world", giving https://example.com/search?q=hello%20world.