cURL → Code Converter

Paste a curl command and get the equivalent fetch, axios, Go net/http, and Python requests snippet. Handles -X, -H, -d / --data, -u, --form, and multiline backslash continuation.

Output as
fetch
const res = await fetch("https://api.example.com/users", {
  method: "POST",
  headers: {
      "Content-Type": "application/json",
      "Authorization": "Bearer xyz"
    },
  body: "{\"name\":\"Alice\",\"email\":\"[email protected]\"}"
});
const data = await res.json();

The parser handles -X / -H / -d / --data / -u / --user / -b / -A / -e and backslash line continuation. Pathological flags (file uploads, mTLS, env-var splicing) may not round-trip exactly.

All processing runs in your browser — no files or inputs are uploaded to a server.

Related tools