Skip to content
Derar Sattouf

Developer Tools

cURL to fetch, axios and Python Converter

Turn a curl command into fetch, axios or Python requests code.

  • No external services
  • Built by Derar Sattouf

cURL Converter

curl command

The command is not saved, because it can contain tokens and passwords.

Code

Loading…

Guide

What is the cURL Converter?

The cURL Converter turns a curl command into the same HTTP request written with JavaScript fetch, axios or Python requests. It reads the method, headers, JSON and form bodies, multipart uploads, basic auth and cookies, and understands shell quoting and line continuations, so a command copied from API docs or browser DevTools can be pasted as it is.

Last updated: November 2026 · Built by Derar Sattouf

How to use it

  1. 01Paste a curl command, including multi-line commands that end in a backslash.
  2. 02Pick fetch, axios or Python requests.
  3. 03Check the request summary and any notes about options that were left out.
  4. 04Copy the code.

Features

  • Output for JavaScript fetch, axios and Python requests
  • Shell quoting: single quotes, double quotes, $'…' strings and backslash line continuations
  • Options with no equivalent are listed, not silently dropped
  • Reads -X, -H, -d and the --data variants, --json, -u, -F, -b, -L, -k, -G, -I, -A, -e and --max-time, also when grouped (-sSL)
  • JSON bodies become object literals; -F becomes FormData or files=
  • The command is never stored or sent anywhere

See all 31 developer tools

Frequently asked questions

Is my curl command sent to a server?

No. The command is parsed in your browser with JavaScript and is never sent to my server. Unlike the other tools here, it is also not saved in your browser between visits, because curl commands often carry API tokens and passwords.

Which curl options are supported?

-X/--request, -H/--header, -d/--data, --data-raw, --data-binary, --data-urlencode, --json, -u/--user, -F/--form, -b/--cookie, -L/--location, -k/--insecure, -G/--get, -I/--head, -A/--user-agent, -e/--referer, --oauth2-bearer, -m/--max-time and --url. Output flags such as -s, -v, -i, -o and --compressed are skipped because they do not change the request. Anything else is listed under the request summary as left out.

Can I paste a command copied from browser DevTools?

Yes, when it is copied as cURL (bash). That format uses single quotes, $'…' strings and backslash line continuations, all of which are read. The Windows variant, Copy as cURL (cmd), uses ^ escapes and is not supported.

Does the generated code behave exactly like curl?

It sends the same method, URL, headers and body, with two differences to know about. fetch, axios and requests follow redirects by default, while curl does so only with -L. And -k (skip certificate checks) becomes verify=False in Python and an HTTPS agent in axios on Node.js, but fetch has no such option, so the fetch output carries a comment instead.

What happens to files in -d @file or -F file=@path?

The tool cannot read files from your computer. Python output opens the path with open(); JavaScript output leaves a named placeholder (file or fileContents) with a comment telling you what to put there.