Paste a cURL command from your terminal, browser DevTools, or API documentation into the input area. Pastefix instantly parses it and generates equivalent code in your chosen language — select from Python, JavaScript, Go, Rust, PHP, and more using the dropdown. Click "Explain with AI" to get a line-by-line explanation of what the cURL command does and how the generated code works.
Pastefix's cURL Converter parses any cURL command, extracts the HTTP method, URL, headers, and body, then generates clean, idiomatic code in 13 programming languages. It handles complex flags like --data, -H, -X, --compressed, and authentication headers.
Pastefix converts cURL to 13 languages: Python (requests), JavaScript (fetch), TypeScript (axios), Go (net/http), PHP (cURL), Ruby (Net::HTTP), Java (HttpClient), C# (HttpClient), Rust (reqwest), Swift (URLSession), Kotlin (OkHttp), R (httr), and Dart (http).
Yes. Pastefix correctly parses -u (basic auth), -H "Authorization: Bearer ..." headers, and cookie flags, then generates the appropriate authentication code for each target language.
Yes. Commands with backslash line continuations (\) are fully supported, which is common when copying from documentation or terminal history.
The cURL parsing happens entirely in your browser. Your commands and API keys are never sent to a server unless you click "Explain with AI."