URL Encoder

Paste text below to escape it for use inside a URL. Everything runs in your browser.

Encode text for a URL

History

    Nothing yet.

    History stays in this browser. It is never sent to our server.

    What gets encoded

    Letters, digits, and the four characters- . _ ~ are safe anywhere in a URL and are left alone. Everything else is replaced with a percent sign and the character's hexadecimal value.

    This page encodes a single value, not a whole URL. That means slashes, question marks and ampersands are escaped too, because inside a value they are ordinary characters rather than structure. If you paste a full URL here you will get a fully escaped string, which is what you want when the URL is going inside another URL as a parameter.

    Encoding a URL inside a URL

    Redirect links do this. When you write?next=https://example.com/a?b=1 the second question mark confuses the parser. Encoding the whole value first turns it into?next=https%3A%2F%2Fexample.com%2Fa%3Fb%3D1, which survives intact.

    Need to go the other way? Use the decoder.