curl-converter

Paste a curl command — including the multi-line kind Chrome/Firefox DevTools' "Copy as cURL" produces — and get working request code in the language of your choice: method, headers, body, basic auth, and the -k/insecure flag all translated.

client-side only 7 languages multi-line aware
curl command
Paste a curl command on the left and click Convert.

// what gets translated, in every language

// what doesn't

Multipart form data (-F/--form) isn't auto-converted in any language — building a multipart body correctly means constructing a real MultipartFormDataContent/FormData/equivalent by hand, so the tool lists the original -F arguments as a comment instead of guessing. Flags that don't affect the request itself (-v, -s, -L, --compressed, output/timeout/proxy options) are silently ignored, since most HTTP clients either have no equivalent or handle the underlying behavior differently by default.

// the fetch exception

Every other language gets a faithful -k/--insecure translation because each has a per-request or per-client way to disable TLS verification. Browser fetch has no such option at all — TLS trust is the browser's job, not the page's — and Node's fetch only offers a process-wide environment variable (NODE_TLS_REJECT_UNAUTHORIZED=0), not a per-request flag. The generated code notes this rather than pretending an equivalent exists.