cURL to Python / JS

Free online cURL to Python requests / JS fetch converter.

cURL cURL to Python / JS Interactive Tool
cURL command

The cURL to Python converter parses a cURL command and rewrites it as Python requests code or JavaScript fetch code. It handles the method, URL, headers, cookies, basic auth, JSON bodies and form data, and even formats JSON payloads for readability.

This is handy when you copy a request from the browser DevTools or an API reference and want to run it in your own code. Both Python and fetch targets are supported. Parsing and conversion happen entirely in your browser.