cURL Converter — Turn cURL Commands into Code
cURL is the lingua franca of HTTP debugging. Every browser, API client, and documentation example can export requests as cURL commands. But when you need to reproduce that request in your application, rewriting it by hand is tedious and error-prone. This converter parses your cURL command and generates equivalent code for popular HTTP libraries — instantly, in your browser.
Supported Output Formats
Choose from JavaScript fetch, Axios, Python requests, Java HttpClient (Java 11+), PHP cURL, C# HttpClient, Ruby Net::HTTP, Rust reqwest, Go net/http, Swift URLSession, Kotlin OkHttp, PowerShell Invoke-RestMethod, and HTTPie. Each generator preserves the HTTP method, URL, headers, request body, cookies, and basic authentication from your original cURL command.
From DevTools to Production Code
The most common workflow: reproduce a failing API call in the browser, copy it as cURL from the Network tab, paste it here, and get a fetch, Python, Java, or PHP snippet to drop into a script or test. This eliminates manual transcription of long Authorization headers, Content-Type values, and JSON payloads.
Language-Specific Notes
Java output uses the standard java.net.http.HttpClient API. PHP output uses the native curl extension with curl_setopt. C# uses HttpRequestMessage for flexible method support. Rust output requires the reqwest and tokio crates. Kotlin output uses OkHttp — add the OkHttp dependency to your Gradle build. PowerShell output uses Invoke-RestMethod for Windows automation and Azure scripts.