Starting points for your own code. Run them in the environment shown below.
Node.js 22+ · ES module (.mjs)
Current inputs apply only to fields used by the example. Selected files are not embedded.
Install dependencies
// curl 'https://example.com/api/users' -X POST \
// -H 'Content-Type: application/json' --data-raw '{"name":"Alice"}'
const url = "https://example.com/api/users";
const options = {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ name: "Alice" }),
};
console.log(url, options);
// Send to your own API: await fetch(url, options);
// Parse shell input as data; never execute pasted cURL with eval/exec.
Put it to work
Convert cURL requests into code for multiple languages.
Details that matter
Format and meaning
Supports URL, -X, -H, -d, --data-raw, and -u. Uploads, shell execution, and unsupported options are rejected.
Supported scope and limits
Text 1 MB
Split inputs that exceed the limit. If a format or algorithm is unsupported, choose a tool that matches your requirements instead of silently changing the format.