Developer
URL Encoder & Decoder
Percent-encode text for safe use in URLs, or decode encoded links back to readable text.
About this tool
URL encoding (also called percent-encoding) replaces characters that aren't safe in a web address - spaces, ampersands, question marks, accented letters - with a % followed by their hex code. This tool encodes text for use in a URL and decodes percent-encoded text back to readable form.
When you need it
- Query parameters - safely pass values with spaces or symbols, e.g. a search term or a name.
- Building links - encode a redirect URL that you're passing inside another URL.
- Debugging - decode an ugly link from an email or browser bar to see what it really contains.
- APIs & tracking - encode UTM values and API parameters correctly.
How it works
This tool uses encodeURIComponent, which escapes everything that isn't a letter, digit, or one of - _ . ! ~ * ' ( ). That makes it ideal for encoding a single value (like one query parameter), because it also escapes &, =, and ? - the characters that separate parts of a URL. A space becomes %20, an ampersand becomes %26, and so on.
Everything runs in your browser. For tracking links specifically, encode each parameter value here before assembling your final URL.
Frequently asked questions
What is URL encoding?
URL encoding, or percent-encoding, replaces unsafe characters in a web address with a % sign followed by their hexadecimal code - for example, a space becomes %20.
Why do I need to encode a URL?
Characters like spaces, &, ?, =, and accented letters have special meaning or are not allowed in URLs. Encoding them ensures the link works and the value is read correctly.
What is the difference between encodeURIComponent and encodeURI?
This tool uses encodeURIComponent, which escapes &, =, ? and / too - ideal for a single query value. encodeURI leaves those intact for encoding a whole URL. Use this tool for individual parameter values.
Why does decoding sometimes fail?
Decoding fails when the text has a stray % not followed by two valid hex digits, or an incomplete escape sequence. Check the string is fully and correctly encoded.
Is my data sent anywhere?
No. Encoding and decoding happen entirely in your browser.
Related tools
JSON Formatter & Validator
Beautify, validate, or minify JSON instantly in your browser. Spot syntax errors fast.
Developer
Base64 Encode & Decode
Encode text to Base64 or decode Base64 to text, with full Unicode support. Runs in your browser.
Developer
UUID Generator
Generate random version 4 UUIDs one at a time or in bulk, using secure browser randomness.
Developer
Hash Generator
Generate SHA-256, SHA-1, SHA-384, and SHA-512 hashes of any text, live in your browser.
Developer
