# cURL to fetch converter: run it free, or from your agent

Turns a curl command into JavaScript fetch, axios or Python requests code, with headers, JSON body, forms and auth.

## Prompt

Use looot to find a catalog endpoint that does what this curl command does, so I can stop managing that API key: [paste the curl command]. 1. Set up https://looot.ai/skill.md. 2. Search the catalog for the same job and compare the price. 3. Run it once with the same input. 4. Return what came back and the cost.

## What it needs

A curl command

## What comes back

- JavaScript fetch code
- axios code
- Python requests code
- method, URL, headers and body
- flags that were skipped

## Endpoints and providers

None. The tool on the web page runs in the browser and calls no endpoint.

## What it costs

Nothing. The tool on the web page runs in the visitor's browser: no account, no API call and no limit per hour. The prompt above runs the same job from your own looot account with current data, billed per call.

## From docs to code

Turn the curl example in an API doc into working code for your stack.

## Replay a request

Copy a request from browser dev tools and replay it in a script.

## Agent tools

Give an agent a ready function instead of a shell command.

## Check the auth

See which header carries the token before you move it to an env var.

## How do I convert curl to fetch?

Paste the command and keep JavaScript fetch selected. Method, URL, headers and body carry over. A JSON body becomes JSON.stringify of an object, so you can edit it as code.

## How do I convert curl to Python requests?

Pick Python requests. A JSON body becomes a Python dict passed as json=, form fields become files=, and -u becomes auth=.

## Which curl flags are supported?

-X, -H, -d, --data-raw, --data-binary, --data-urlencode, --json, -F, -u, -A, -e, -b, -G, -I, -k, -m and --url, plus grouped short flags such as -sSL. Output and logging flags are ignored, and anything else is listed under the code.

## Does it handle multi-line commands?

Yes. Backslash line breaks, single and double quotes and $'...' strings are read the way a shell reads them.

## Why does the fetch code leave out -k?

Browsers cannot turn off TLS certificate checks, so the page says so instead. Python gets verify=False, which you should only use against a test server.

## How do I copy a request as curl from Chrome?

Open dev tools, go to the Network tab, right-click the request and pick Copy, then Copy as cURL (bash). Paste it here.

## Is my command sent anywhere?

No. The conversion runs on this page, so tokens in the headers stay in your browser. Move them to environment variables before you commit the code.

## Related tools

- /free-tools/json-formatter
- /free-tools/jwt-decoder
- /free-tools/base64-encoder-decoder

## Last reviewed

2026-10-14.
