Web Tool

URL Encoder / Decoder

Encode special characters for safe URL transmission or decode percent-encoded strings back to readable text. Supports both encodeURIComponent and encodeURI modes.

Encoding Mode
Input
⚠ Decoding error β€” input may not be valid percent-encoded text.
Output
Input: 0 chars
Output: 0 chars
Ratio: β€”

URL Encoding Reference

CharacterEncodedNotes
Space%20 or ++ only in form data mode
&%26Parameter separator
=%3DKey-value separator
?%3FQuery string start
#%23Fragment identifier
/%2FPath separator (encoded in component mode)
+%2BLiteral plus sign
@%40Email/authority delimiter

encodeURIComponent vs encodeURI

encodeURIComponent β€” Encodes everything except A–Z a–z 0–9 - _ . ! ~ * ' ( ). Use this for encoding individual query parameter values.

encodeURI β€” Encodes everything except characters allowed in a complete URI including / : @ # ? & = + $ ,. Use this for encoding a full URL while preserving its structure.

Form Data β€” Replaces spaces with + instead of %20, matching how HTML forms submit data via GET or POST.

Frequently Asked Questions

When should I use URL encoding?
Any time you include user-supplied data in a URL β€” such as search queries, email addresses, or file names passed as query parameters. Unencoded special characters (& = # ?) can break the URL structure or be interpreted incorrectly by servers.
What is the difference between %20 and + for spaces?
Both represent a space. %20 is the standard percent-encoding per RFC 3986. The + notation comes from HTML form encoding (application/x-www-form-urlencoded). Most servers decode both correctly in query strings, but %20 is safer in path segments.
Why are some characters not encoded?
RFC 3986 defines "unreserved characters" (letters, digits, hyphen, underscore, period, tilde) that are safe in any URI context and don't need encoding. Encoding them unnecessarily adds length without benefit.