cURL to Code
Convert cURL to fetch, axios, Python, PHP or Go.
POST https://api.example.com/v1/orders?limit=10 · 2 headers · body
const res = await fetch("https://api.example.com/v1/orders?limit=10", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
"item": "Notebook",
"qty": 2,
"gift": false
}),
});
const data = await res.text();Converted in your browser — tokens and passwords in the command never leave your device. Supports -X, -H, -d / --data-raw / --data-urlencode / --json, -F, -u, -b, -G, -k and -L.
How to use
- 1Paste a cURL command (from Chrome DevTools: right-click a request → Copy as cURL).
- 2Pick a language.
- 3Check the method, URL and headers summary.
- 4Copy the generated code.
Frequently asked questions
Which cURL options are supported?
-X, -H, -d, --data-raw, --data-binary, --data-urlencode, --json, -F (multipart), -u (basic auth), -b (cookies), -G, -k and -L.
Is JSON body detected?
Yes. A JSON body becomes JSON.stringify in JavaScript and json= in Python requests.
Is my API token safe?
Yes. Conversion happens in your browser and the command is never sent anywhere.
Does it handle Windows commands?
Commands with ^ line continuations from Windows Copy as cURL (cmd) work; bash format is best.
Is my data uploaded?
No. Everything runs in your browser; nothing you paste is sent to a server.
You may also need
Image to Base64
Images to data URIs, and Base64 back to images.
Code Beautifier
Format JS, TS, HTML, CSS, JSON, YAML with Prettier.
PX to REM & clamp()
Convert px and rem; generate fluid clamp() CSS.
Flexbox & Grid Generator
Build flex and grid layouts visually; copy CSS.
Fake Data Generator
Indian test data as JSON, CSV, Excel or SQL.
JWT Generator
Sign JWTs with HS256/384/512 or verify a signature.