cURL to Fetch Converter

Convert a curl command into JavaScript fetch() code.

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: ... })

Related tools

Frequently asked questions

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