cURL to Multi-Language Code Converter
Turn a cURL command into Python, JavaScript, Go and more
- Runs in your browser
- 16 targets in 8 languages
- Headers, query strings and bodies
About cURL to Multi-Language Code Converter
Paste a cURL command, the kind you copy from browser dev tools or API docs, and get equivalent request code for 16 targets across Python, JavaScript, TypeScript, Go, Rust, PHP, Java and C#. The method, headers, query string and body carry over, and credentials in the command are flagged so you can move them to environment variables. The command is parsed in your browser and never run.
Where cURL commands come from
API documentation often gives examples as cURL commands, and browser developer tools can copy any network request as cURL. Converting that command into your own language saves rewriting headers, query strings and request bodies by hand.
Supported targets
The converter generates code for 16 targets:
- Python: requests, httpx (sync and async) and aiohttp
- JavaScript: fetch, axios and node-fetch
- TypeScript: fetch
- Go: net/http and resty
- Rust: reqwest (async and blocking)
- PHP: Guzzle and the native cURL extension
- Java: java.net.http.HttpClient
- C#: System.Net.Http.HttpClient
What doesn’t translate
The method, URL, headers, query string and body carry over. Timeouts, -L (follow redirects), --compressed and HTTP version flags aren’t carried into the generated code, and multipart form uploads (-F) aren’t converted. Each of these gets a note under Things to check, so you know to set it in your HTTP client.
Further reading
Questions people ask
- Does the converter run my request?
- No. The command is parsed in your browser and never executed or sent anywhere.
- What happens to tokens in the command?
- They stay in your browser. Authorization headers, API keys, -u passwords, cookies and secret-looking query parameters are flagged, and Copy without secrets replaces their values with placeholders so you can load them from environment variables instead.
- Why was my command rejected?
- Only a single curl command is accepted. Shell pipes, redirects and chained commands such as && are refused, because they can’t be translated safely into request code.