Percent-encode special characters in URLs (RFC 3986) or decode URL-encoded strings back to readable text. Supports both encodeURIComponent and full URI encoding modes. Everything runs in your browser — your data never leaves your machine.
Any time you embed data inside a URL — query parameters, path segments, or form submissions — you must encode characters that have special meaning in URLs. For example, if a user's name is "John & Jane", the ampersand must be encoded as %26 to avoid it being interpreted as a query string separator. Similarly, spaces (%20), hashes (%23), and plus signs (%2B) all carry structural meaning and must be escaped when they appear in data values.
Component encoding (equivalent to JavaScript's encodeURIComponent) encodes everything except unreserved characters — the right choice when encoding individual query parameter values or path components. Full URI encoding (equivalent to encodeURI) preserves characters that are syntactically valid in a full URL (:/?#[]@!$&'()*+,;=), and is better suited when encoding a complete URL that should remain navigable.
%XX hex sequences
%20, & → %26, # → %23
-_.~) are never encoded
/, ?, #, &, = too
%20, + → %2B
& → %26, = → %3D
/ → %2F, ? → %3F
# → %23, @ → %40
&, <) are for HTML documents
%20 (URL) with (HTML)
URL encoding is essential any time you pass user-supplied data as part of a URL — in query parameters, path segments, form submissions, or API calls. Failing to encode special characters like &, =, ?, #, and spaces can silently break your URL structure or, worse, open your application to injection attacks. As a rule: always encode values, never encode the full URL structure, and let your HTTP library or framework handle encoding automatically where possible.
That said, double-encoding is a common mistake that is hard to debug. If a value has already been encoded — for example, a URL retrieved from a database that was stored pre-encoded — applying encodeURIComponent() again will encode the percent signs themselves, turning %20 into %2520. Always decode first if you are unsure of the input state, then re-encode cleanly. This tool's decode mode is designed exactly for this: paste an encoded URL, decode it to inspect the raw values, then re-encode correctly if needed.