Paste a cURL command and get matching request code in TypeScript, Python, Go or Rust, ready to copy into your project.
This converter reads a cURL command and rewrites it as code you can run in your own project. It picks up the URL, the method set with -X, headers set with -H and a request body set with -d. Choose a target language to see the output: TypeScript using fetch, Python using the requests library, Go using the standard net/http package, or Rust using reqwest.
The TypeScript and Python output include the headers and JSON body; the Go and Rust output currently set up the method and URL only, so add headers and the body by hand. A typical use is copying a request from your browser's developer tools as cURL and turning it into a starting point for a script or test. Conversion happens in your browser.
The URL, -X for the method, -H for headers and -d for the request body. Other options are ignored.
The Go and Rust templates currently include only the method and URL. Add headers and the body manually after copying.