cURL to Code Converter
Convert a cURL command to JavaScript fetch, Python requests, Go or PHP code. Parses headers, methods, JSON bodies and basic auth. Everything runs locally in your browser; nothing is uploaded.
Paste a cURL command, for example copied from your browser's Network tab, and pick a language. Headers, method, body and basic auth are carried into the generated code.
cURL command
Code
Output appears here.Learn more
Turning a request into code
A cURL command encodes a method, URL, headers and body. The converter reads those parts and writes the equivalent call with the target language's standard HTTP client.
Check before shipping
Generated code has no error handling or retries. Move tokens out of the source into environment variables before committing.
Frequently asked questions
Which cURL flags are supported?
-X, -H, -d and the --data variants, --json, -u, -A, -b and -I. Other flags such as -s and -L are ignored.
Are secrets uploaded?
No. The command is parsed in your browser, so tokens in it never leave your device.
Can I copy a request from Chrome?
Yes. In DevTools open Network, right-click a request and choose Copy as cURL.