Convert a curl command into equivalent JavaScript fetch code, entirely in your browser.
How to use the cURL to fetch
Paste a curl command.
The equivalent fetch code is generated instantly.
Copy the JavaScript into your project.
Frequently asked questions
The common ones: -X for the method, -H for headers, -d and its variants for the body, -u for basic auth, plus -A and -b. A data flag implies POST.
No. The conversion runs entirely in your browser, so your command and any tokens in it never leave your device.
Yes. Backslash line continuations are joined automatically, so you can paste a command exactly as it appears in docs.
A converter that turns a curl command into clean JavaScript fetch code, parsing the method, URL, headers and body.
It runs locally in your browser, so it is fast and your request details stay private.
Related tools
Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text, right in your browser.
Convert colors between HEX, RGB and HSL with a live preview.
Convert Unix timestamps to human dates and back — UTC, local, ISO 8601 and relative time. Seconds and milliseconds are auto-detected.
Percent-encode and decode URLs and URL components, UTF-8 safe.
We use essential cookies to run the site. With your consent we also load Google AdSense, which sets advertising cookies. See our privacy policy.