cURL to Code
Convert a cURL command to request code for JavaScript, Python, Swift, Go or Rust. Requests are not executed.
How to use
- Paste your input or load the example below.
- Adjust the options, then select “Generate code”.
- Review the result, then copy or download it.
No uploads. No account. Processing stays in your browser.
Example input
curl -X POST 'https://api.example.com/v2/orders?expand=items' -H 'Authorization: Bearer demo-token-not-a-secret' -H 'Content-Type: application/json' -H 'X-Request-ID: demo-2048' --data '{"customer":{"id":42,"email":"[email protected]"},"items":[{"sku":"KB-01","quantity":1},{"sku":"CB-02","quantity":2}],"gift":true}'