OKFree Tools
Developer

URL Encoder & Decoder

Percent-encode or decode links and query values, and break a URL into protocol, host, path and query parameters

Runs locally in your browser. Nothing is uploaded.

Text to encode

For a single query value or path segment. Encodes everything except letters, digits and - _ . ! ~ * ' ( ), including / ? & = # :

Result

Type something on the left to see it encoded here

URL breakdown

Enter a full URL starting with https://, or a query string such as a=1&b=2, to see its protocol, hostname, path and every parameter here

How to use

  1. 1
    Pick a direction and method

    When encoding, use encodeURIComponent for a single value and encodeURI for a whole URL. When decoding form data, tick Treat + as a space.

  2. 2
    Enter your text

    The result updates as you type. If the percent-encoding is broken, the error shows the character where it starts.

  3. 3
    Read the URL breakdown

    For a full URL, the panel below lists the protocol, hostname, port, path, hash and every query parameter, each with its own copy button.

Tips

  • Use encodeURIComponent for values

    An & or = inside a value has to be encoded, or it’s read as a separator between parameters. encodeURI leaves both as they are, so use encodeURIComponent when building query values.

  • Watch out for double encoding

    Encoding already-encoded text turns every % into %25. If you see %25 in a result, it was most likely encoded twice.

  • Non-ASCII domains and Punycode

    DNS and certificates use the Punycode form that starts with xn--, so bücher.example is really xn--bcher-kva.example. The URL breakdown shows both.