curl to fetch
Processed in your browser · nothing is uploaded
Turns a `curl` command into a `fetch` call — method, headers, body and auth — including the multi-line form that a browser’s "Copy as cURL" produces.
How to use the curl to fetch
The workflow this exists for is the one every developer has: open the network tab, right-click a request, copy as cURL, and now you need it in code. The command that gives you is long, backslash-continued and full of headers, and translating it by hand is tedious rather than hard. A JSON body is pretty-printed into a `JSON.stringify` call rather than left as a string, because that is what you want to edit next. A body that is not JSON — form encoding, plain text — stays a string, since reformatting it would change it. One warning that matters. A copied cURL contains your live cookies and `Authorization` header, which are credentials. Do not paste that command into a chat, a ticket or a public snippet without removing them first. Nothing typed here is uploaded, but the same command is dangerous everywhere else, and people paste it into things that are not local far too readily.
Questions
Yes, including the backslash-continued multi-line form and the long header list.