URL Encoder/Decoder — Online URL Encoding Tool

Encode or decode URLs online. Percent-encode special characters for use in URLs or decode encoded URL strings.

By SwiftCalcTools Editorial Team · Formula verified

Loading URL Encoder/Decoder…

Preparing your calculator

How to Use URL Encoder/Decoder

  1. 1Enter the required values in the input fields above.
  2. 2Click the Calculate button or results update instantly as you type.
  3. 3View your results in the output panel below the inputs.
  4. 4Adjust any values to recalculate instantly.

Frequently Asked Questions

URL encoding (percent-encoding) converts characters that are not allowed or have special meaning in URLs to a % followed by two hex digits. Example: space → %20, & → %26, = → %3D, + → %2B. URLs can only contain ASCII characters; non-ASCII characters (like ā, ñ, ₹) are first UTF-8 encoded, then percent-encoded.
encodeURIComponent: use for encoding a single query parameter value (encodes &, =, ?, /, #, and all special URL characters). encodeURI: use for encoding a complete URL (does NOT encode ?, &, =, /, # as these are valid URL structure characters). Rule: if you are encoding a value that goes inside a URL, use encodeURIComponent. If encoding a full URL, use encodeURI.
Both represent a space, but in different contexts. %20 is the standard percent-encoding of space (works everywhere in URLs). + is a shorthand for space only in application/x-www-form-urlencoded format (HTML form submissions). In query strings, + is decoded as space by most servers. encodeURIComponent uses %20; HTML forms use +. When decoding form data, use + → space first, then %XX decoding.
Non-ASCII characters are first encoded as UTF-8 bytes, then each byte is percent-encoded. Example: ₹ (Indian Rupee sign, U+20B9) → UTF-8: 0xE2 0x82 0xB9 → URL encoded: %E2%82%B9. The character à (U+00E0) → UTF-8: 0xC3 0xA0 → %C3%A0. Always use encodeURIComponent which handles Unicode correctly via JS engine's UTF-16 to UTF-8 conversion.