Skip to main content
Tools Convert
CURL

cURL → fetch()

v1.0 · Everything below stays in your browser

Convert a cURL command to a JavaScript fetch() call. Preserves method, headers, and body.

Runs entirely in your browser · Your input is never transmitted

cURL
0 BReady
fetch()
OK

How to use

  1. Paste a cURL command (with any shell line continuations).
  2. fetch() output appears on the right.
  3. Copy into your code.

Frequently asked

Which cURL flags?

-X/--request, -H/--header, -d/--data/--data-raw, -u (basic auth), -G, --compressed. Complex flags may need manual tweaks.