All tools · 📐 Format / Inspect

🌀 cURL → fetch() Converter

Browser DevTools "Copy as cURL" is great for sharing requests, but to actually run them in JS you need fetch(). Paste any curl command — we generate the matching fetch() call, preserving method, headers, body, and basic auth.

Loading tool…

Examples

GET with headers
Inputcurl -H "Authorization: Bearer x" https://api.example.com/data
Outputfetch("https://api.example.com/data", { headers: { Authorization: "Bearer x" } })
POST JSON
Inputcurl -X POST -H "Content-Type: application/json" -d '{"a":1}' https://api.example.com
Outputfetch("...", { method: "POST", headers: ..., body: '{"a":1}' })

Frequently asked questions

Does it handle multipart/form-data?

Single-file uploads (-F field=@file) need to become FormData in JS. We hint at it but you may need to adjust manually.

What about curl --cookie?

Converted to a Cookie header. Note: in browsers, fetch by default uses credentials: "same-origin" — set credentials: "include" for cross-origin cookies.

Will the converted fetch work in Node.js?

Modern Node (18+) has fetch built in. Older versions need node-fetch or undici.

About this tool

cURL → fetch() Converter runs entirely in your browser using standard Web APIs. No data is sent to any server. The source for this tool is in our public GitHub repository.

Related tools

← All 96 tools

Why this tool

vs typical free web-tool sites

1vwTypical free site
PriceFreeFree
Signup requiredNoOften (for premium features)
Ads inside the toolNoYes (banner + video)
Data sent to serverNo (browser-only)Yes (inputs analyzed for ads)
Total tools96Often <20 or scattered across sites
Bookmarkable URL per toolYesMixed
Loads in under 1sYes (static)Often slow (ad tracking)
MultilingualEN / ES / PT / FR / DEUsually EN only
Open sourceYesNo