Text & code · runs locally

curl to fetch() converter

Paste a curl command, get a drop-in fetch() snippet — method, headers, body, auth and timeouts included.

Runs on your device No uploads, ever Free, no account

How to use this tool

  1. 1
    Paste the curl command

    Multi-line commands with backslashes, quoted strings and --flag=value forms all parse. Copy-paste straight from your terminal history or API docs.

  2. 2
    Review the translation

    Flags become real fetch options: -d/--json become a body, -u becomes a Basic auth header, --max-time becomes AbortSignal.timeout. Untranslatable flags become commented warnings.

  3. 3
    Copy request.js

    The snippet includes status checking and a .json() or .text() read based on your Content-Type header.

The fine print

This page has no server behind it. Files are read, changed and re-built by your own browser — then they disappear when you close the tab. That's the whole privacy policy, applied.


Questions people actually ask

Which curl flags are supported?

-X/--request, -H/--header, -d/--data/--data-raw/--data-binary/--data-urlencode, --json, -u/--user, -A/--user-agent, -e/--referer, -b/--cookie, -L/--location, -I/--head, -G/--get, -o/--output, --max-time and --url. Anything else is dropped with a comment explaining why.

Why does -k become a comment instead of an option?

fetch has no “insecure TLS” switch — skipping certificate verification in a browser is not available, by design. The output tells you to fix the certificate rather than pretend the flag survived.


Feedback

Send a message

Messages, reviews and bug reports go to a private feedback log on this site. Nothing is published, and your files are never uploaded.

For a broken tool: the tool name, browser, and the steps that led to it are the most useful things. Do not paste passwords, keys or a sensitive file.

Files are never uploaded. Only this message is stored.

PDF

Tool preview

A short description of the tool.

Runs entirely in your browser. The file never leaves this device.

Open tool