cURL to Code Converter
Paste any curl command — get idiomatic code in 12 languages, instantly and privately.
Turn API documentation examples into working code for your stack in one paste. The parser understands real shell syntax — quotes, escapes, line continuations — and the generators write idiomatic code, not string-concatenated templates: native JSON dicts in Python, BodyPublishers in Java, Invoke-RestMethod hashtables in PowerShell. Everything runs in your browser; commands with API keys never touch a server.
Frequently Asked Questions
Which languages can it convert cURL commands to?
Twelve targets: JavaScript fetch, Axios, Node.js, Python requests, Python httpx, PHP cURL, PHP Guzzle, Go net/http, Java HttpClient, C# HttpClient, Ruby Net::HTTP and PowerShell — covering the stacks behind the vast majority of API integrations.
Which curl options does the parser understand?
The common working set: -X/--request, -H headers, all the -d/--data variants, --data-urlencode, --json, -F multipart forms, -u basic auth (converted to an Authorization header), -b cookies, -A user-agent, -e referer, -L redirects, -k insecure, --compressed and -G. Quotes, escapes and multi-line backslash continuations are handled like a shell would.
Does my API key in the command get sent anywhere?
No — conversion is 100% client-side JavaScript. The command, including any tokens in it, never leaves your browser. Still, rotate any credentials you paste into ANY online tool as a habit.
Why does JSON data look different in the Python output?
When the body is valid JSON, the converter emits an idiomatic native dict passed via json= (with True/False/None correctly converted) instead of a raw string — the way an experienced Python developer would actually write it.
What happens if my command used -k / --insecure?
The converted code faithfully disables TLS verification AND carries a loud warning comment, because shipping that to production enables man-in-the-middle attacks. Fix the certificate instead whenever possible.