Free curl to Python Converter

Convert a curl command to Python requests code. Paste a request copied from DevTools and get its headers, cookies, JSON and form data as runnable Python.

Loading tool…

How it works

Copy the request as cURL

In Chrome, Edge or Firefox DevTools, right-click a request in the Network panel and choose Copy as cURL. On Windows, pick the bash or POSIX version.

Convert it

Shell quoting is parsed like bash, including $'...' strings. Headers, cookies, auth, JSON, form and multipart data map to requests arguments.

Run the Python

Copy the code or download request.py, then pip install requests. Options that were not converted are listed above the code.

Which curl options are converted?

-X, -H, -A, -e, -b, -u, --digest, -d, --data-raw, --data-binary, --data-urlencode, --json, -F, -G, -I, -L, -k, -x, -m, --url, --url-query and --oauth2-bearer. Files referenced with @ in -d, -b or -H are not read. Windows cmd and PowerShell syntax are not supported.

Will Python send the same request?

Headers, cookies, form data and redirects match what curl 8 does. requests re-serializes JSON: spacing changes, non-ASCII becomes \u escapes and numbers can change form (1e5 becomes 100000.0). It adds its own User-Agent, Accept-Encoding and Connection headers when the command sets none, uses HTTP/1.1 and has its own TLS fingerprint, so bot detection can answer differently.

Is my command sent anywhere?

No. Conversion runs in this tab and the command is not sent to a server. Copied commands often carry session cookies and tokens, so treat the code like a password.

Request blocked?

Browser Use cloud browsers run a maintained Chromium fork with residential proxies.