cURL to Code
Paste a curl command and copy fetch(), Node.js, or Python requests equivalents.
Your command never leaves the browser — no upload, no server.
Input
Supports line continuations (\ and ^), quoted args, headers, JSON/form bodies, basic auth, and cookies.
Notes
About this tool
Docs and browser DevTools often give you a curl one-liner. Turning that into fetch() or Python requests code by hand is tedious — especially with headers, JSON bodies, and line continuations.
Paste the curl command here and copy JavaScript fetch(), Node fetch, Node https, or Python requests output. The parser follows shell quoting rules, including backslash and caret continuations and the $'…' strings that Chrome's "Copy as cURL" produces. It handles basic auth, cookies, and form data, and it sends -d data with the same form content type curl uses. JSON bodies are pretty-printed when detected.
This is the inverse of the Route → curl tool. Your command never leaves the browser.
Read more
- How to use curl
- Tool tutorials — including how to convert curl to fetch
- Make HTTP requests in Node.js
- REST API concepts
- HTTP request headers
Free books, courses, and software
Get my programming books, course editions, and complete software.
Get the download library →