Developer Tools

URL Encoder / Decoder

Encode and decode URLs, query parameters, and special characters with percent-encoding.

Advertisement

Sponsored Space

About the URL Encoder / Decoder

URLs may only contain a limited set of ASCII characters. All other symbols, spaces, and reserved delimiter characters (?, &, =, #) must be percent-encoded when used in query parameters to prevent parsing errors.

How to Use the URL Encoder / Decoder

  1. 1Select the mode: "URL Encode" or "URL Decode".
  2. 2Paste your URL string or query parameters into the input box.
  3. 3View the converted string generated live.
  4. 4Copy the result or use the quick "Swap" button to reverse the operation.

How It Works & Underlying Logic

URL encoding replaces unsafe ASCII characters with a % followed by two hexadecimal digits representing the UTF-8 byte value (e.g. space becomes %20, & becomes %26).

Mathematical Formula / RuleEncoded: encodeURIComponent(string) | Decoded: decodeURIComponent(string)

Practical Calculation Examples

Encoding Query String

Safely encoding a search query with spaces and symbols

Input: https://example.com/search?q=smart phones & tablets
Output: https://example.com/search?q=smart%20phones%20%26%20tablets

Decoding Percent-Encoded URL

Deciphering encoded tracking parameter

Input: redirect_url=https%3A%2F%2Fsite.com%2Fdashboard
Output: redirect_url=https://site.com/dashboard

Helpful Tips & Best Practices

  • Use encodeURIComponent() when encoding parameter values, and encodeURI() when encoding a full URL while preserving protocol/host slashes.
  • + is frequently used in query strings to represent a space character.

URL Encoder / Decoder FAQ

URLs have reserved characters (such as ?, =, &, /) that define URL structure. If your parameter values contain these characters, they must be percent-encoded so the server parses them correctly.

Related Online Tools

More in Developer Tools