Home / Tools / URL encoder and decoder
URL encoder and decoder
Scraping APIs take the page you want as a url parameter, and any ?, & or space in that address has to be encoded or the API reads only part of it. Paste the address to encode it, or paste an encoded one to read it.
https%3A%2F%2Fwww.example.com%2Fsearch%3Fq%3Drunning%20shoes%26page%3D2
As a request: ?url=https%3A%2F%2Fwww.example.com%2Fsearch%3Fq%3Drunning%20shoes%26page%3D2
Worked out in your browser. Nothing you paste is stored, sent or added to the page address, so tokens and cookies stay on your machine.
What it is for when you scrape
An unencoded & in the target address ends the url parameter early: the API fetches https://www.example.com/search?q=running and treats page=2 as one of its own options. The request still succeeds, and on most APIs it is still billed, so the mistake shows up only as wrong pages in the data. Encode the whole address once; do not encode it twice, or the site receives %25 where it expected %.
Most HTTP libraries encode query parameters for you when you pass them as a map rather than building the string by hand; the cURL converter shows how in each language.