Dev Tools
Client-sidefiles never upload

cURL ↔ fetch ↔ Python converter

Paste a cURL command. Convert to JavaScript fetch, Python requests, or HTTPie. Multi-line \ continuations and single/double quotes both supported.

const res = await fetch("https://api.example.com/users", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer abc123",
  },
  body: "{\"name\":\"Mark\",\"role\":\"qa\"}",
});
const data = await res.json();
How to use
  1. Paste a cURL command on the left (supports \ line continuations and both quote styles).
  2. Pick a target on the top-right: fetch (JS), Python requests, or HTTPie.
  3. Copy the generated code to your project.
Tips
  • Supported flags: -X -H -d --data-raw --data-urlencode -u -A -b -G. Unrelated flags (-k -s --compressed) are silently ignored.
  • fetch output uses await / async — wrap it in an async function when you paste it in.

Related tools