ToolWren logo ToolWren
ToolWren › cURL Converter

cURL to Code Converter

Paste a cURL command and instantly get equivalent code in Python (requests), browser JavaScript (fetch) or Node.js. Great for turning API docs and DevTools "Copy as cURL" into working code.

100% client-side · nothing is uploaded

Loading tool…

How to use the cURL Converter

  1. Paste a curl command (for example from your browser's Copy as cURL) into the Input box.
  2. Pick the target language tab — Python, JavaScript or Node.js.
  3. The equivalent code is generated instantly in the output.
  4. Click Copy to paste the code straight into your project.

Privacy: this tool runs entirely in your browser. Your input is never sent to, received by, or stored on any server — there are no uploads and no tracking of what you enter.

About cURL Converter

From cURL to code

The converter parses the URL, method, headers and body from your cURL command and rebuilds them as an HTTP request in your chosen language — no more hand-translating flags.

Supported flags

Common options are understood: -X/--request, -H/--header, -d/--data, -u/--user (basic auth), -A (user agent) and -b (cookies).

Tip: Copy as cURL

In Chrome or Firefox DevTools, right-click any network request and choose "Copy as cURL", then paste it here to reproduce the call in your code.

Frequently asked questions

Which languages are supported?
Python (requests), JavaScript (fetch) and Node.js (fetch).
Does it handle JSON bodies?
Yes. A -d body is carried through as the request body; set a Content-Type header for JSON APIs.
Is basic auth supported?
Yes — -u user:pass becomes an Authorization: Basic header.
Is anything sent to a server?
No. Parsing and code generation run entirely in your browser.

Related tools