cURL Converter Dev tools
Convert cURL commands to code in 35+ languages & frameworks
cURL Converter
Paste a cURL command — from Postman, your terminal, API docs, or “Copy as cURL” in browser DevTools — and instantly get clean, idiomatic request code in 35+ languages & frameworks. Everything runs locally in your browser; your command and any tokens never leave the page.
// Paste your cURL command on the left.
Convert cURL to Any Programming Language
Our free cURL converter takes a raw curl command and turns it into clean, idiomatic HTTP request code for the language and library of your choice. It parses the request method, URL, query parameters, headers, authorization (Bearer & Basic), cookies and request body (JSON, form-urlencoded and multipart form-data), then re-writes the equivalent request using each language's native HTTP library — just like Postman's “Code” panel, but free, instant, and entirely in your browser. It's the fastest way to turn a working curl request from API documentation into production code for your stack.
Supported Languages & Frameworks
- Python — Requests, http.client
- PHP — cURL, Guzzle, HTTP_Request2, pecl_http
- JavaScript — Fetch, jQuery, XHR
- Node.js — Axios, Native, Request, Unirest
- Go — net/http
- Java — OkHttp, Unirest
- Kotlin — OkHttp
- C# — HttpClient, RestSharp
- C — LibCurl
- Ruby — Net::HTTP
- Rust — reqwest
- Swift — URLSession
- Objective-C — NSURLSession
- Dart — Dio, HTTP
- R — httr, RCurl
- OCaml — Cohttp
- PowerShell — Invoke-RestMethod
- Shell — HTTPie, wget
- HTTP — Raw request · cURL · Postman CLI
How to Use the cURL Converter
- Copy a cURL command (from Postman, your terminal history, API docs, or browser DevTools → Network → right-click → “Copy as cURL”).
- Paste it into the input box on the left. The request overview (method, host, headers, body) appears instantly.
- Pick your target Language and Framework / Library — or tap a popular target chip for one-click switching.
- Copy the syntax-highlighted code, or download it as a file.
cURL Flags We Understand
The parser recognises the flags you actually paste from real commands and maps each to the right concept in the generated code:
| Flag | What it maps to |
|---|---|
-X, --request | HTTP method (also inferred — a body implies POST) |
--url / positional URL | Request URL & query string |
-H, --header | Request header |
-d, --data, --data-raw, --data-binary, --data-ascii | Request body (JSON or raw) |
--data-urlencode | URL-encoded form field |
--json | JSON body + sets Content-Type & Accept |
-F, --form | multipart/form-data field or file upload (@file) |
-u, --user | HTTP Basic authentication header |
-b, --cookie | Cookie header |
-G, --get | Moves data fields into the query string |
-A, --user-agent · -e, --referer | User-Agent / Referer headers |
--compressed | Accept-Encoding handling |
-k, --insecure | TLS verification skipped (flagged in the request overview) |
Frequently Asked Questions
Is it safe? Does my command get sent anywhere?
No. The entire conversion runs client-side in JavaScript. Your cURL command — including any API keys, bearer tokens or credentials — is parsed in memory and never transmitted to our servers, logged, or stored.
Does it support authentication?
Yes. Both Authorization: Bearer … headers and -u user:pass Basic auth are detected and rendered as the correct header for each target language (Basic credentials are base64-encoded for you).
Can it handle POST bodies, JSON and file uploads?
Yes. JSON bodies (--data / --json), URL-encoded form data (--data-urlencode) and multipart form uploads (-F, including @file references) are all supported and produce the idiomatic body-building code for each library.
What about multi-line commands?
Multi-line commands using backslash (\) continuations — the format Postman and most docs export — are parsed correctly, as are single- and double-quoted arguments.
Why generate code instead of just running the request?
Because you usually want the request in your codebase, not just a one-off response. This tool gives you copy-paste-ready code in your language's native HTTP client so you can drop it straight into a project, script, or test.
Does it work offline?
Once the page has loaded, the converter keeps working without a network connection — there are no server round-trips for the conversion itself.