curl to Code Converter
Paste a curl command and get equivalent code in JavaScript fetch, Node.js axios, Python requests, or Go net/http — including headers, request bodies, and basic auth. Nothing is sent anywhere; the parsing happens locally.
Runs locally — nothing you enter is sent
Developer
Free · no signup
Supports -X, -H, -d/--data, -u, --compressed, and backslash line continuations.
Paste a curl command above to convert it.
How to use
- Paste a curl command (for example, one copied from your browser's DevTools “Copy as cURL”).
- Pick the output language: JavaScript fetch, Node axios, Python requests, or Go net/http.
- Review the generated code — method, URL, headers, body and auth are carried over.
- Copy the snippet into your project.
Examples
POST with JSON body
curl -X POST https://api.example.com/users -H 'Content-Type: application/json' -d '{"name":"Ada"}'Supported formats
- Input: a curl command with common flags (-X, -H, -d / --data, --data-raw, -u, --user, -F).
- Output: JavaScript (fetch), Node.js (axios), Python (requests), Go (net/http).
Privacy
This tool runs entirely in your browser. Nothing you enter or open is sent anywhere. Privacy policy.
Limitations
- Exotic curl flags (proxies, client certificates, --resolve, retry options) are ignored rather than translated.
- Multiline shell constructs other than backslash line continuations may not parse.
FAQ
Is my curl command uploaded anywhere?
No. The command is parsed entirely in your browser with plain JavaScript — safe for commands containing API keys, though rotating any pasted secret is always good practice.
Where do I get a curl command from my browser?
In Chrome or Firefox DevTools, open the Network tab, right-click a request and choose 'Copy as cURL'. Paste the result here.
Which parts of the request are converted?
The HTTP method, URL, headers, request body (raw or form data), and basic authentication credentials.