cURL to Code Converter
Convert cURL Commands to Code
Paste a curl command and generate equivalent JavaScript fetch() or Python requests code.
About cURL
cURL is a command-line tool for transferring data with URLs. It is widely used for testing and documenting HTTP APIs. A typical curl command specifies a URL, an optional HTTP method (-X), request headers (-H), and a request body (-d or --data).
This converter reads the most common curl flags and rewrites the request as runnable code. The JavaScript output uses the built-in Fetch API, while the Python output uses the popular requests library. This is handy when you copy a curl example from API documentation and want to use it in your own application.