πŸŒ€cURL Converter

Convert cURL commands to fetch, Axios or Python

const options = {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer TOKEN"
  },
  body: "{\"name\":\"Ada\",\"role\":\"admin\"}",
};

fetch("https://api.example.com/users", options)
  .then((res) => res.json())
  .then((data) => console.log(data))
  .catch((err) => console.error(err));

About the cURL Converter

cURL Converter turns a cURL command into ready-to-run code for JavaScript fetch, Axios, or Python requests. Paste the command you copied from your browser DevTools or API docs and get clean client code instantly.

Everything is parsed in your browser β€” your URLs, headers, tokens, and request bodies never leave your device.

Common use cases

  • Turning a "Copy as cURL" from DevTools into fetch or Axios code
  • Porting an API example from cURL into Python
  • Quickly scaffolding an HTTP request in your app
  • Sharing API calls as code instead of shell commands

How to use the cURL Converter

  1. Paste your full cURL command into the input box.
  2. Choose a target: JavaScript (fetch), Axios, or Python (requests).
  3. Copy the generated code into your project.

Frequently asked questions

Which cURL flags are supported?

Common ones: -X/--request, -H/--header, -d/--data and its variants, -u/--user for basic auth, -A user-agent, -b cookies, and -e referer. Boolean flags like --compressed and -L are safely ignored.

Is my data sent anywhere?

No. Parsing and code generation run entirely in your browser; nothing is uploaded.

Does it handle file uploads (-F)?

Multipart form uploads with -F are not converted yet. Headers, JSON/url-encoded bodies, and auth are fully supported.