cURL → Fetch
Convert a cURL command into JavaScript fetch code.
Runs entirely in your browser
FAQ
- Which cURL flags are supported?
- -X/--request, -H/--header, -d/--data (all variants), --data-urlencode, -u/--user, -A/--user-agent, -e/--referer, -b/--cookie. Transport flags like -k, -L, --compressed are ignored because they don't map to fetch.
- How is a JSON body detected?
- By an explicit Content-Type: application/json header, or by the body starting with { or [. Detected JSON is emitted pretty-printed inside JSON.stringify.