curl → fetch()
Paste any curl command. Get clean JavaScript fetch() code. Runs in your browser — nothing sent to a server.
-X method
-H headers
-d body
-u basic auth
-b cookies
-L redirects
--max-time
zero deps
curl command
JavaScript fetch()
// paste a curl command and click convert →
examples — click to load
Simple GET
curl https://api.github.com/repos/...
POST with JSON body
curl -X POST ... -H Content-Type -d ...
Bearer auth header
curl -H "Authorization: Bearer ..."
Basic auth (-u)
curl -u admin:password ...
DELETE request
curl -X DELETE -H Authorization ...
Follow redirects (-L)
curl -L https://short.url/...
supported flags
| -X / --request | HTTP method (GET, POST, PUT, PATCH, DELETE, etc.) |
| -H / --header | Request headers (repeatable) |
| -d / --data / --data-raw / --data-binary | Request body |
| -u / --user | Basic auth → Authorization: Basic header |
| -b / --cookie | Cookie header |
| -L / --location | Follow redirects → redirect: "follow" |
| -k / --insecure | mode: "no-cors" (noted in comment) |
| --max-time / --connect-timeout | AbortController signal with setTimeout |
also useful: httpwut — HTTP status decoder →
power user?
use this daily? tools.voiddo Pro · $9 one-time
supports 66 free tools · Pro license via Paddle · one flat price, no subscription