Paste a cURL command and get Python requests code. Headers, body, authentication and form files included.
No sign-up, no fees.
Converts a cURL command to Python requests code.
Headers, JSON body, form data, file upload and authentication.
Lists options it couldn't convert instead of hiding them.
What you type is processed, but never shared with anyone.
How to convert cURL to Python
The API docs show a cURL example but you work in Python. Three steps:
Paste the command. Put the curl ... line (it can span several lines) into the cURL command box.
Read the code. Python code using requests appears below. JSON bodies become Python literals (true → True).
Copy. Take the code into your project with Copy.
What are cURL and requests?
cURL is a widely used command-line tool for making web requests; API documentation usually gives its examples as cURL. In Python, the most common way to make the same request is the requests library. This tool reads the cURL options and writes the matching requests call, so you don't have to translate each flag by hand.