%2F

URL Encoder / Decoder

Percent-encoding and query string parser

Encode and decode URLs online with percent-encoding and query string parsing. Debug API calls, fix broken redirect URLs and parse complex query parameters — 100% client-side, instant results.

Input URL
Invalid URL — add protocol (https://)

// quick guide

URL encoding (also called percent-encoding) converts characters that are not safe in a URL into a representation that browsers and servers can transmit reliably. A space becomes %20, an ampersand becomes %26, and so on — each unsafe character is replaced by a percent sign followed by its two-digit hexadecimal ASCII code.

This matters because the characters ? & = # / all have structural meaning in URLs. If your query parameter value contains an ampersand (e.g., a company name like "AT&T"), that ampersand must be encoded as %26 or the server will interpret it as a parameter separator rather than part of the value.

How to use this tool:

  • Select the Encode tab and paste a URL or raw string to encode special characters for safe transmission.
  • Select the Decode tab and paste a percent-encoded string to read the original human-readable form.
  • The Parse view accepts a full URL and breaks it into its components: protocol, host, port, pathname, and query parameters displayed as a key-value table. This is especially useful for debugging API endpoints with complex query strings.
  • Copy any individual component or the full encoded/decoded result with one click.

Common scenarios where this tool helps:

  • Debugging a webhook URL where redirects are failing because special characters in query parameters weren't encoded.
  • Reading a redirect URL from an OAuth flow where the redirect_uri parameter is percent-encoded.
  • Building a URL manually for an API call that requires parameters containing spaces, plus signs, or non-ASCII characters.
  • Diagnosing a 400 Bad Request error caused by unencoded characters in a query string.

// frequently asked questions

Why do we need URL encoding?

URLs can only be sent over the internet using the ASCII character set. Spaces and special characters (like ?, &, =, +, %) must be encoded to prevent web browsers and servers from misinterpreting them as parameter separators or protocol commands.

What is the difference between encodeURI and encodeURIComponent?

encodeURI is used to encode a full URL and preserves URL punctuation (like : / ? # & =). encodeURIComponent is used to encode a query parameter value and encodes all characters including punctuation so it doesn't break the URL structure.

Is this URL parser safe to use for sensitive URLs?

Yes. The parsing, encoding, and decoding process runs 100% locally on your computer. None of your API tokens, redirect URIs, or query parameters are transmitted to any server.

Why does a space sometimes become + and sometimes %20?

Both represent spaces, but in different contexts. The application/x-www-form-urlencoded format (used in HTML forms) encodes spaces as +. The RFC 3986 percent-encoding standard (used in URL paths and REST APIs) encodes spaces as %20. When in doubt, %20 is unambiguous and works everywhere.

What characters are safe in a URL without encoding?

The unreserved characters — A–Z, a–z, 0–9, hyphen (-), underscore (_), tilde (~), and period (.) — never need encoding. Everything else should be percent-encoded when used as data values within a URL.