Convert any cURL command into a JavaScript fetch() call instantly. Headers, body, auth — all preserved. 100% client-side, never sent anywhere.
cURL is the universal HTTP CLI; fetch() is the universal browser HTTP API. This tool translates the first into the second so you can take any cURL command — from an API documentation page, a Postman export, or Chrome DevTools — and use it directly in JavaScript.
Many cURL commands carry authentication tokens, session cookies, or API keys. Sending them to a remote conversion service is a real security risk. This converter parses everything client-side: the moment you close the tab, nothing remains. You can confidently paste production credentials.
The HTTP method (-X), every header (-H), the request body (-d / --data variants), basic-auth credentials (-u), user agent, referer, and cookies are all carried into the fetch() call. Headers are emitted as a plain object that the Fetch spec accepts directly.
cURL transport flags (-k for insecure TLS, -L to follow redirects, --compressed, -v for verbose output) have no direct fetch equivalent. fetch() always follows redirects by default, browsers manage TLS, and verbosity is replaced by DevTools' Network panel. These flags are silently ignored — your converted code is functionally equivalent.
Open any web app, hit F12, switch to Network, perform the action, right-click the request, choose Copy → Copy as cURL, paste it here. You now have a runnable fetch() call you can drop into a script — perfect for reverse-engineering undocumented APIs or generating quick reproduction cases.
It supports the flags fetch() can express: -X/--request, -H/--header, -d/--data variants, -u/--user (turned into Basic auth), -A/--user-agent, -b/--cookie, -e/--referer. Transport flags like -k, --compressed, -L, -v have no fetch equivalent and are silently dropped.
No. Parsing and conversion run entirely in your browser using JavaScript. Your URL, headers, tokens and request body never leave the page.
Yes — right-click any network request → Copy → Copy as cURL, and paste it here. Backslash line continuations are handled automatically.
Modern fetch usage is almost always inside an async function. If you need .then() chains for older runtimes, you can refactor manually — the converter outputs the cleanest modern form.
Simple --data and --data-raw are supported. Multipart file uploads (-F/--form) need a FormData object in fetch and are not auto-generated yet — the converter will skip those flags.
Browse all free tools · Guides and tutorials · PDF tools · Developer tools · Text tools · SEO tools