cURL to Fetch Converter

Your workspaceProcessed on your device

Use one HTTP(S) request with literal URLs, headers and body text. Handles common method, header, data, JSON, HEAD and redirect options.

The tool generates text. It keeps the request on this device.

A few things to know.

Accepts one POSIX cURL command up to 32,768 characters, with HTTP(S), common method, header, HEAD, data, JSON and redirect options. Supports up to 40 headers and a 16 KiB UTF-8 body. File references, shell expansions, repeated data options and unsupported Fetch mappings are declined.

  1. Paste a single cURL command or load the example JSON POST.
  2. Convert to Fetch and verify the request mapping. Resolve any unsupported options, repeated headers or browser-controlled fields.
  3. Copy the JavaScript or download fetch-request.mjs. Check your browser’s CORS policy and redirect handling in your application.