Reproducing a browser request
Before
Copied a POST request as cURL from Chrome DevTools
After
Working fetch() code with the right headers
Saved 10 minutes of manual header copying. The Authorization header was easy to miss.
I built this because I kept copying network requests from Chrome DevTools as cURL and then rewriting them by hand into fetch(). Paste the cURL, get working fetch() code, and stop rewriting headers manually.
curl command
JavaScript fetch()
fetch("https://example.com", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: "{\"email\":\"you@example.com\",\"password\":\"secret\"}"
})
.then((res) => res.json())
.then((data) => console.log(data));Your files are processed in your browser and never uploaded to any server.
One thing that's easy to miss: cURL commands from DevTools include a lot of headers you don't actually need — cookies, user-agent, and tracking headers. The tool keeps them all, which is fine for testing, but strip the unnecessary ones before production. Also, if the request has `--compressed` or `-k` flags, those don't map to fetch() — you'll need to handle them separately.
— Mirza Noman Baig
These are actual measurements from using this tool, not estimates.
Before
Copied a POST request as cURL from Chrome DevTools
After
Working fetch() code with the right headers
Saved 10 minutes of manual header copying. The Authorization header was easy to miss.
Before
Docs only had a cURL example
After
fetch() code ready for a React component
Docs were written for backend devs. This tool bridged the gap.
Before
Request worked in terminal, failed in the browser
After
Converted cURL to fetch — saw the missing cookie
The terminal cURL used a session file. The browser needed the cookie explicitly. Made it obvious.
Extracts URL, method, headers, and body — generates working code.
Common auth headers, JSON bodies, and form data all map correctly.
Designed for 'Copy as cURL' from Chrome and Firefox.
Tokens in Authorization headers never leave your browser.
It handles the common ones: -X, -H, -d, --data-raw, -u, --compressed. Some flags don't have a fetch() equivalent and are skipped.
Yes. That's the main use case. Chrome, Firefox, and Edge all work.
No. Everything runs in your browser. Your cURL commands, including any Authorization headers, never leave your device.
Yes. JSON bodies, form data, and URL-encoded bodies all map correctly to fetch() options.
This tool generates fetch(). Axios syntax is different and not currently supported.