Loading…
Loading…
Convert cURL commands to Python, JavaScript, Go, and PHP
Try an example:
Paste a cURL command above
Or click one of the example buttons to get started
Run your projects on Claude Code?
We packaged the .claude config that runs this site — 26 specialist agents, 14 workflow skills, and 6 rule files from 31 real production incidents. From $9.
Get the Claude Code Production Pack — $29cURL is the universal language of API testing and documentation. API docs, browser DevTools, Postman, and Insomnia all export requests as cURL commands. Translating a cURL command into production-ready Python requests, JavaScript fetch, or Go net/http code manually requires knowing the correct function signatures, header dictionary syntax, and body serialization for each language. A converter that parses the cURL command once and emits idiomatic code for six languages eliminates this repetitive translation work.
The cURL parser tokenizes the input command by splitting on whitespace while respecting quoted strings and backslash-escaped characters. It then processes each flag sequentially: -X sets the HTTP method, -H adds a header to a map, -d and --data set the request body, -u sets Basic Authentication credentials, -k sets SSL verification behavior, and -L enables redirect following.
Once the cURL model (method, URL, headers, body, auth, flags) is built, each language emitter transforms the model into idiomatic code. JavaScript fetch uses the fetch() global with a RequestInit object. Axios uses axios.request() with the config object. Python requests uses requests.request() with keyword arguments. Go uses http.NewRequest(), http.Header, and io.NopCloser for the body. PHP uses curl_setopt() calls. Node.js native uses the https.request() callback pattern.
The body is detected as JSON if it parses as valid JSON and the Content-Type header is application/json — in which case language-native object literals replace raw string bodies in the output.
A developer copies a cURL command from Stripe API documentation and converts it to Python requests for a backend integration, saving 10 minutes of manual translation.
A frontend developer exports a failing API request from Chrome DevTools as cURL and converts it to JavaScript fetch to reproduce the issue in a test script.
A backend engineer converts a Postman-generated cURL command to Go net/http code for a microservice that does not use any HTTP client library.
A developer builds a CI script in Python that replicates a webhook test from a cURL command, converting the command in one click rather than reading the requests library docs.
Paste your cURL command into the input textarea
The tool auto-detects method, headers, body, and auth
Switch between 6 language tabs to see the equivalent code
Copy the generated code with one click
About the cURL to Code Converter
Method (-X), headers (-H), body (-d, --data, --data-raw), auth (-u for Basic), insecure (-k), and follow redirects (-L). Backslash line continuations are handled.
JavaScript fetch, JavaScript axios, Python requests, PHP cURL, Go net/http, and Node.js native https module.
Yes. All parsing and code generation happens entirely in your browser. Your API keys and tokens never leave your device.
The parser joins backslash-terminated lines into a single command string before tokenizing. This means you can paste cURL commands copied directly from API documentation that span multiple lines with trailing backslashes, and the tool will parse them correctly.
Yes. When the -d or --data flag contains a JSON string and the Content-Type header is application/json, the converter formats the body as a parsed JavaScript/Python/Go object rather than a raw string. This produces more readable output than treating the body as a plain string literal.
In Python requests, -k maps to verify=False. In Node.js https, it sets rejectUnauthorized: false in the agent options. In Go, it configures http.Transport with InsecureSkipVerify: true. The generated code includes a comment warning that SSL verification should not be disabled in production.
Yes. The -H "Authorization: Bearer <token>" flag is parsed and rendered as the appropriate Authorization header in all target languages. Bearer token headers are passed through as-is; the converter does not attempt to decode or refresh the token.
Builder/critic agent prompts with brakes built in
Open →DeveloperFormat, validate & diff JSON — runs entirely in browser
Open →DeveloperTest regex live — railroad diagrams + plain English explained
Open →DeveloperOne color in, full design system out
Open →