Your files stay on your device

# cURL to fetch, axios, and Python requests

Turn a cURL command into fetch, axios or Python requests code, with a list of flags that did not translate.
Loading editor…

Paste a curl command and the code shows up here.
OptionsCopy code

## Why -d makes a POST

curl sends GET unless told otherwise. Adding -d or --data supplies a request body, and curl switches to POST when no -X flag names a method. The line curl https://api.example.com/users -d 'name=Ada' therefore becomes a POST with a form-encoded body and a Content-Type of application/x-www-form-urlencoded.

## Reading the converted request

- Method is the verb the converted code sends, after any -X flag has been applied.
- Headers lists each -H value as its own name and value pair, so a missing header is easy to spot.
- The URL row shows the address with its query string intact.

## Flags that do not carry over

Some flags change how a request is sent rather than what it contains. Options for skipping certificate checks, routing through a proxy, or reading cookie files have no direct match in the generated code. The converter reports those when it cannot map them. Add the equivalent setting by hand, using whatever option the target library provides.

## More web & auth tools

- [HTTP header parser](/web/headers)
- [JWT decoder](/web/jwt)
[All web & auth tools](/web)

Was this tool useful?
YesNo

---

Canonical HTML: https://nutter.tools/web/curl-converter
Markdown version: https://nutter.tools/web/curl-converter.md
Plain-text version: https://nutter.tools/web/curl-converter.txt
Agent index: https://nutter.tools/llms.txt

