cURL to Fetch Converter
Convert one literal POSIX cURL command to JavaScript Fetch code locally. Supports URL, method, headers and literal data; rejects unsupported options without executing anything.
cURL to Fetch Converter
Accepts curl, -X/--request, -H/--header, --url, -d/--data, --data-raw, --data-binary and -I/--head. One HTTP(S) URL, 100,000 characters maximum. File data, shell expansion, pipelines, forms, cookies, authentication flags and redirects are rejected. Fetch has browser CORS and forbidden-header restrictions; conversion cannot guarantee the request will run. Duplicate header names, GET/HEAD bodies, URL credentials and URL glob patterns are rejected. Use quotes around URLs containing shell-special characters. Supported methods are normalized to uppercase.
Ready. Input stays in this browser.
A QUICK WALKTHROUGH
How to use this tool
- Paste one command.
- Convert and check unsupported options.
- Copy the code; no request is sent.
cURL to Fetch Converter
Accepts curl, -X/--request, -H/--header, --url, -d/--data, --data-raw, --data-binary and -I/--head. One HTTP(S) URL, 100,000 characters maximum. File data, shell expansion, pipelines, forms, cookies, authentication flags and redirects are rejected. Fetch has browser CORS and forbidden-header restrictions; conversion cannot guarantee the request will run. Duplicate header names, GET/HEAD bodies, URL credentials and URL glob patterns are rejected. Use quotes around URLs containing shell-special characters. Supported methods are normalized to uppercase.
GOOD TO KNOW
Common questions
What are the supported limits?
Accepts curl, -X/--request, -H/--header, --url, -d/--data, --data-raw, --data-binary and -I/--head. One HTTP(S) URL, 100,000 characters maximum. File data, shell expansion, pipelines, forms, cookies, authentication flags and redirects are rejected. Fetch has browser CORS and forbidden-header restrictions; conversion cannot guarantee the request will run. Duplicate header names, GET/HEAD bodies, URL credentials and URL glob patterns are rejected. Use quotes around URLs containing shell-special characters. Supported methods are normalized to uppercase.