Skip to content
Jellykit

cURL to Python Requests

Convert a curl command into Python requests code with headers, JSON or form data, cookies and basic auth. Paste from API docs or DevTools. Free and private.

Runs in your browser. Nothing is uploaded.

About cURL to Python Requests

Paste a curl command and get a ready-to-run Python script using the requests library. Headers become a dict, JSON bodies become a json= argument (so requests sets Content-Type for you), form posts become data= and -u becomes auth=.

It's the quickest way to turn an example from API documentation, or a request copied from the browser's Network tab, into a Python script or notebook cell.

How to use cURL to Python Requests

  1. Type or paste your text into the input box. Press Sample to see an example.
  2. The result appears instantly as you type.
  3. Copy the result, or press Use as input to chain another transformation.

Frequently asked questions

Do I need to install anything?

Only the requests package: pip install requests.

Why is the Content-Type header missing for JSON?

requests adds Content-Type: application/json automatically when you pass json=, so the converter leaves it out to avoid duplicates.

Is cURL to Python Requests free and private?

Yes. cURL to Python Requests is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.

See all developer tools →