Convert cURL to fetch
Convert a supported literal cURL request into JavaScript fetch code.
Input & settings
How to use this tool
Paste your source, choose the supported options, then process. Inspect or download the complete result.
Limits and behavior
Supports one HTTP(S) URL, method, headers and literal data. Shell operators/substitutions, file-backed bodies, authentication helpers, multipart, redirects and unsupported switches rejected. Conversion does not send the request. Maximum total input 1 MB, output 3 MB, JSON nesting 64 levels. Processing stays in your browser worker. Input is limited to 1 MB and output to 3 MB. No input content is saved by CraftAI.
Translate cURL into fetch code
Convert a supported curl command into a JavaScript fetch request to use as a starting point in code.
Can the converter handle every shell script or curl flag?
No. It supports defined literal request forms, not arbitrary shell execution or every cURL feature.
Related tools: convert fetch to curl · inspect and format http headers