cURL to Code Converter
Paste a cURL command and convert it to code in your favorite language. Everything runs locally in your browser.
cURL Command
// Converted code will appear here...
Example cURL Commands
Simple GET Request
curl https://api.example.com/users
POST with JSON Body
curl -X POST -H "Content-Type: application/json" -d '{"name":"John"}' ...
Authentication with Bearer Token
curl -H "Authorization: Bearer sk-abc123" ...
Basic Auth (-u flag)
curl -u admin:secret123 https://api.example.com/admin
Form Data with Cookies
curl -X POST -d "user=test&pass=123" -b "session=abc" ...
Follow Redirects + Insecure
curl -L -k --compressed https://example.com/api