</>

WebDevTools

cURL Converter

Turn terminal commands into JavaScript

Paste a cURL from DevTools or generate cURL from method, URL, headers and body.

cURL

Command must start with curl

fetch

Guide: convert cURL commands to fetch, axios, and more

Docs and DevTools copy requests as `curl -X POST … -H 'Authorization: …'`. Rewriting into fetch, axios, or Python requests loses `-d`, `--data-raw`, or cookies easily.

Parsing runs in-browser — pasted commands are not uploaded. Use staging curls without production tokens or replace secrets with placeholders first.

Use to bootstrap HTTP clients, reproduce support bugs, or codegen E2E tests. Cross-check with the API tester for headers and body parity.

Step by step

  1. Paste the full cURL commandInclude URL, method, headers, and body. Keep terminal line continuations with `\`.
  2. Pick language or libraryfetch, axios, ofetch, Python requests — match your project runtime.
  3. Review body and content-typeJSON, form-urlencoded, and multipart map differently — watch `-F` uploads.
  4. Integrate and testPaste into code, move secrets to env vars, run against staging.

Frequently asked questions