URL Encoder / Decoder
Encode and decode URLs, URIs, and query parameters using standard percent-encoding (encodeURIComponent, encodeURI, form-urlencoded). 100% client-side, fast and secure.
URL percent-encoding is a data transformation mechanism for safe URI transmission. It does not provide security, confidentiality, or data obfuscation. Do not pass unencrypted secrets in plain URLs.
Standards Comparison: URL Component vs Full URL vs Form Data
| Input | URL Component | Full URL | Form Data |
|---|---|---|---|
| hello world | hello%20world | hello%20world | hello+world |
| a+b | a%2Bb | a+b | a%2Bb |
| a&b | a%26b | a&b | a%26b |
| a=b | a%3Db | a=b | a%3Db |
Form Data (application/x-www-form-urlencoded) is used by HTML forms and POST request bodies, where spaces are represented as +.
Sample Test Vectors & Common Scenarios
hello worldC++ programmingname=John Doe&email=test@example.comBogotá, Colombia🔐 secure dataC%2B%2BUnderstanding URL / URI Percent-Encoding
URI Percent-encoding translates arbitrary characters into standard ASCII printable characters safe for transmission across the internet. Reserved characters like ?, /, #, &, =, and : have special structural meanings in URIs. Depending on whether you are encoding a full URL, a query component, or application/x-www-form-urlencoded form data, different rules apply.
What Is URL Encoding?
Percent-encoding (URL encoding) replaces characters that aren't safe inside a URL — spaces, symbols, and non-ASCII characters — with a % followed by their hexadecimal byte value, so links and query strings survive being copied, pasted, and transmitted by any browser or server.
How to Use the URL Encoder / Decoder
- Paste the text or URL you want to encode, or a percent-encoded string you want to decode.
- Pick a mode: encodeURIComponent for a single value (like a query parameter), encodeURI for a full URL, or form-urlencoded for HTML form submissions.
- Choose Encode or Decode.
- Copy the result.
Technical Notes
- encodeURIComponent escapes reserved characters such as &, =, and / so a value is safe to embed inside a query string; encodeURI leaves those characters intact because it expects a complete URL.
- form-urlencoded (application/x-www-form-urlencoded) represents spaces as + instead of %20 — the convention browsers use for HTML form submissions.
- Encoding is fully reversible and adds no security or privacy — it only makes text safe to transport inside a URL.
Example
Frequently Asked Questions
What is the difference between URL Component and Full URL encoding?+
URL Component mode (encodeURIComponent) encodes all reserved characters (?, /, #, &, =, :, @) so text can safely be used as a query parameter value. Full URL mode (encodeURI) preserves URI structural syntax while encoding spaces, Unicode, and unprintable characters.
Why are spaces encoded as + in Form Data mode?+
The application/x-www-form-urlencoded specification (commonly used in HTML form submissions and HTTP POST requests) specifically encodes spaces as + instead of %20. Literal plus signs (+) are encoded as %2B.
How does decoding handle + versus %2B?+
In Form Data mode, decoding replaces literal + signs with spaces first, then percent-decodes UTF-8 sequences. Therefore, %2B is correctly converted to + while + becomes a space.
What happens if I try to decode a malformed percent string?+
If the input contains invalid hexadecimal pairs or truncated UTF-8 sequences (such as %ZZ or %E0%A4), the tool catches the URI error cleanly and displays an error message without crashing.
