cURL Converter — curl to Code
Paste a curl command and instantly turn it into clean JavaScript, Python, or Node.js code.
About the cURL Converter
curl is the go-to command for testing web requests from a terminal, and it shows up everywhere — in API documentation, browser developer tools, and shared bug reports. But once you want that request inside an app, you have to translate it by hand. This tool does the translation for you: paste a curl command and get working code that makes the exact same request in JavaScript, Python, or Node.js — matching the address, method, headers, body, cookies, and sign-in details.
- In your browser's Network tab, right-click a request and choose “Copy as cURL”, then paste it here.
- Keep quotes matched — every opening quote needs a closing one — so the command reads cleanly.
- Adding data automatically switches the request to POST, exactly like curl does.
How it works
Three steps. No sign-up, no upload, no wait.
Paste your command
Drop in a curl command copied from your terminal, browser network tab, or API docs.
Pick a language
Switch between JavaScript, Python, and Node.js — the code updates instantly.
Copy the code
Grab ready-to-run code that recreates the exact same request.
Private by design.Everything happens right here in your browser. Your files are never uploaded — we never see them.
Frequently Asked Questions
Which curl options does it understand? ▼
-X / --request), any number of headers (-H / --header), the request body (-d, --data, --data-raw, --data-binary), basic sign-in details (-u / --user), cookies (-b / --cookie), and follow-redirects (-L / --location). Line breaks with a trailing backslash and quoted values are handled too.Is my command sent anywhere? ▼
Which languages can it produce? ▼
JavaScript using the built-in fetch, Python using the popular requests library, and Node.js using its native fetch. Just copy the one you need.Does adding a body change the method? ▼
POST. You can still force any method by keeping -X in the command.Why does my generated code look slightly different from the command? ▼
-u become an Authorization header, and repeated headers are combined. The resulting request behaves the same way.It says it can't read my command — what now? ▼
curl and that every quote has a matching partner. Very unusual or rarely-used options may be skipped. Try trimming the command down to the address, headers, and body.