curl to fetch converter

Turn a curl command into JavaScript fetch() code — headers, method, body, auth and form fields included.

The command stays in this browser — nothing is fetched and nothing is sent.

Covers the common flags: -X, -H, -d/--data-*, -u, -A, -e, -b, -F, -L, -k, --url. Other flags are skipped and listed as notes. File references (@file) can't be read — attach them in the code. Browser fetch can't disable TLS verification.

How to use

  1. Paste a curl command.
  2. Read the generated fetch code and the notes on skipped flags.
  3. Copy it into your project.

What it supports

Covers -X, -H, -d/--data-*, -u, -A, -e, -b, -F, -L, -k, --url. Other flags are skipped and listed. File references (@file) can't be read — attach them in the code. Browser fetch can't disable TLS verification. Commands up to 100,000 characters.

Related tools

Related guides