cURL to Code
Convert cURL commands to JavaScript fetch, Python requests, Axios, or PHP. Paste a curl command and get ready-to-use code.
Paste a cURL command — including the long ones with multiple headers, a JSON body, and auth tokens — and get the equivalent code in JavaScript (fetch or axios), Python requests, or PHP. The flags most people use (-X, -H, -d, --data-raw, --data-binary) are all supported. Useful when the API docs only ship cURL examples and you need code in another language, or when copying a request out of browser DevTools to script it. The parsing happens in your tab — secrets in the command never leave the page.
Next steps
URL Parser
RecommendedBreak any URL into protocol, host, path, query params, and hash.
URL Encoder / Decoder
RecommendedPercent-encode and decode URLs and URL components. Supports encodeURIComponent and encodeURI.
JSON Formatter
Instantly format, validate, or minify JSON — spot errors in seconds.
Base64 Converter
Encode or decode Base64 in one click — works with text and files.
What Is a cURL Converter?
Common Use Cases
API documentation translation
Drop a cURL example from a vendor's API docs into the tool and get the equivalent fetch or requests call ready to paste into your app.
Reproducing a DevTools network call
Copy a failing request from Chrome DevTools as cURL and convert to runnable code that reproduces the bug in a minimal test case.
Postman export to source code
Export a Postman request as cURL, paste it here, and skip the friction of Postman's built-in (and often verbose) code generators.
Backend SDK scaffolding
Bootstrap the first call against a new third-party API by translating their cURL example into your stack's native client.
Frequently Asked Questions
Advertisement