cURL to Code Converter
Turn a curl command into ready-to-run JavaScript fetch, Node.js, Python requests or PHP cURL code.
How to use
Using the generated code
Paste any curl command, including multi-line commands with backslashes, then choose the target language. Headers, the HTTP method and the request body are preserved.
- Copy a curl command from an API's documentation.
- Paste it and pick a language.
- Copy the snippet into your project.
Frequently asked questions
Which curl options are supported?
Requests, headers, data, user credentials, cookies and common flags. Options that do not change the request, such as -s or -L, are ignored.
Is my command sent anywhere?
No, the parsing and code generation run entirely in the browser.
Related tools
URL Parser
Break a URL into protocol, host, port, path, query and fragment, and inspect every query parameter.
HTTP Status Code Reference
Search every common HTTP status code with its name and a short explanation of when it is returned.
JSONPath Tester
Query JSON data with JSONPath expressions and see matching values instantly.
HTML Formatter
Beautify HTML with consistent indentation while keeping inline and void elements correct.
CSS Formatter
Beautify CSS with one property per line and consistent indentation.
JavaScript Formatter
Beautify JavaScript with proper indentation, spacing and line breaks.