Paste a cURL command and get fetch(), Python requests, or Node axios code — instantly.
Copying a request as cURL from Chrome DevTools, Postman, or an API's documentation is the fastest way to capture exactly what a request looked like — but then you still have to translate it into whatever language your app is written in. This free tool does that translation for you: paste a cURL command and get equivalent fetch(), Python requests, or Node axios code, ready to drop into your project.
The converter understands the flags that show up in real-world cURL commands: -X/--request
for the HTTP method, -H/--header for headers, -d/--data/--data-raw
for the request body (including JSON bodies, which get converted to a proper object literal or dict), -u/--user
for Basic Auth, -b/--cookie, -F/--form for multipart form uploads, and
-G for converting data into query parameters. Multi-line commands copied from DevTools (with trailing
\ line continuations) are handled automatically.
Parsing and code generation happen entirely in your browser using JavaScript. Your cURL command — which often contains auth tokens, cookies, or API keys — is never uploaded to a server.
Here's what each output format is best suited for, and how the converter handles common cURL patterns.
The built-in browser (and modern Node) HTTP client. No dependency to install — ideal for frontend code, browser extensions, or quick scripts. JSON bodies are serialized with JSON.stringify().
The de facto standard HTTP library for Python. JSON bodies use the json= parameter (so requests sets the Content-Type for you), and Basic Auth maps to the native auth=(user, pass) tuple.
A popular promise-based HTTP client for Node.js and the browser. Generated code uses axios's config-object call style, with a dedicated auth option for Basic Auth credentials.
If your -d payload is valid JSON, it's converted into a real object/dict literal (not just a string) in every output format, so the generated code stays readable and editable.
Copy a request as cURL from the Network tab in DevTools, then instantly get the equivalent fetch() call to reproduce it in your app.
Turn an API's cURL example from its documentation into working Python or Node code without hand-translating headers and body by hand.
Convert a cURL command captured from a bug report or Postman collection into a Python script for a test suite.
See how the same HTTP request looks across three different clients — a fast way to learn the request/response patterns of a new language or library.
In Chrome or Firefox DevTools, open the Network tab, right-click any request, and choose "Copy as cURL". Postman also has a "Code" button on any request that can export it as cURL.
Yes. Commands copied from DevTools often span multiple lines with a trailing backslash (\) at the end of each line — the converter automatically joins these into a single command before parsing.
Yes, for the common cases: -u user:pass (Basic Auth) is converted to each language's native auth mechanism, and an Authorization header from -H is passed through as-is, whatever scheme it uses (Bearer, API key, etc.).
Flags that don't affect the generated HTTP call — like -k/--insecure, -L/--location, -v/--verbose, or --compressed — are safely ignored rather than causing a parse error.
No. All parsing and code generation happens locally in your browser with JavaScript. This matters since cURL commands often contain auth tokens, session cookies, or API keys you don't want to send to a third party.
Not currently — this tool converts cURL to code, one direction only. If you need to inspect or format the JSON body of a request, try the JSON Formatter.
Built by Deepak Kumar — a developer who wanted a JSON tool that respects your privacy. All processing happens in your browser. Your data never leaves your device.