DEVtoy
Language · English

cURL to Code

Convert a cURL command to request code for JavaScript, Python, Swift, Go or Rust. Requests are not executed.

How to use

  1. Paste your input or load the example below.
  2. Adjust the options, then select “Generate code”.
  3. 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/v1/items -H 'Authorization: Bearer abc' -H 'Content-Type: application/json' --data '{"name":"Ada"}'

Related tools