cURL to Fetch Converter

Convert a curl command into JavaScript fetch() code.

Support
Works Offline
Privacy First
No Login
No API

curl command

JavaScript fetch()

About the cURL to Fetch Converter

Paste a curl command copied from your terminal or browser dev tools and instantly convert it into equivalent JavaScript fetch() code, including method, headers, and JSON body.

Examples

POST request

curl -X POST https://api.example.com -d '{"a":1}'

Output

fetch("https://api.example.com", { method: "POST", body: ... })

Keyboard shortcuts

  • Copy the main outputCtrl / ⌘ + Shift + C
  • Download the resultCtrl / ⌘ + S
  • Share this toolCtrl / ⌘ + Shift + S
  • Reset the inputsAlt + R
  • Open the tool search paletteCtrl / ⌘ + K

Related tools

Frequently asked questions

Version 1.0.0 · Updated 2026-08-06 · Runs entirely in your browser