URL encoder
URL encode text so it fits safely in a URL path or query parameter. Reserved and non-ASCII characters become percent codes. Runs in your browser.
How to URL encode a string
Paste the value into the input pane and click Convert. Every character that has a special meaning in a URL, or isn't plain ASCII, is replaced with a percent code. A space becomes %20, & becomes %26, = becomes %3D, / becomes %2F and é becomes %C3%A9. Letters, digits, hyphens, underscores, periods, exclamation marks, tildes, asterisks, apostrophes and parentheses are left as they are. Copy the encoded value into your link or query string.
Why encode URLs
Raw spaces or symbols can break links and query strings, or servers can read them the wrong way. Encoding makes sure the value arrives as you meant it.
How it works
The tool uses the browser's encodeURIComponent function. That's the right choice for a single query value or path segment.
A quick example
To search for rock & roll in a query parameter, the value rock & roll would otherwise end the parameter at the ampersand. Encoded, it becomes rock%20%26%20roll, so the full link is ?q=rock%20%26%20roll and the server reads the whole phrase.
Before you start
Input: TXT. Output: Encoded. The settings appear before anything runs, so you can check them first. Your original file is never changed.
The value you enter is processed in your browser. Still test the output where it will be used. Clean formatting does not prove the data is safe or correct.
Keep the original until you have opened and checked the result. The work happens in this browser tab, so the size you can handle depends on your device's memory, your browser and the file itself.
How to use the URL encoder
- Paste the text you want to encode.
- Click Convert to percent-encode it.
- Copy the encoded value into your URL or query string.
Last updated · How we build and check tools · Report an error