cURL to Code & Code to cURL Converter
- Paste any cURL request from your terminal.
- Get client code in languages like JavaScript, Python, and more.
- Perfect for API docs, SDKs, and onboarding.
curl -X GET "https://api.example.com/users"
Convert curl commands into code for JavaScript fetch, Axios, Node.js, Python, Java, C#, PHP, Go, Ruby, Swift, Kotlin, Rust and Dart โ
or paste code snippets and generate the equivalent curl. Everything runs securely in your browser.
cURL โ Code
Input cURL Command
Supports common flags: -X, -H, --header, -d, --data,
--data-raw. This is a best-effort helper, not a full shell parser.
After conversion, language-specific snippets appear below.
Generated Code
JavaScript fetch
๐ Copy// Result will appear here after converting.
Axios (JS)
๐ Copy// Result will appear here after converting.
Node.js https
๐ Copy// Result will appear here after converting.
Python requests
๐ Copy# Result will appear here after converting.
Java HttpClient
๐ Copy// Result will appear here after converting.
C# HttpClient
๐ Copy// Result will appear here after converting.
PHP cURL
๐ Copy// Result will appear here after converting.
Go net/http
๐ Copy// Result will appear here after converting.
Ruby (Net::HTTP)
๐ Copy# Result will appear here after converting.
Swift (URLSession)
๐ Copy// Result will appear here after converting.
Kotlin (OkHttp)
๐ Copy// Result will appear here after converting.
Rust (reqwest)
๐ Copy// Result will appear here after converting.
Dart (http)
๐ Copy// Result will appear here after converting.
Code โ cURL
Paste a simple HTTP snippet (fetch, Axios, Python requests, Java HttpClient, C# HttpClient,
PHP cURL, Go net/http) and this tool will try to infer the equivalent curl command.
This is a best-effort converter and works best with small, self-contained examples.
Input Code Snippet
Generated cURL
# Result will appear here after converting.