Why Convert curl to Code?
API documentation and browser DevTools' "Copy as cURL" almost always give you a curl command - great for a quick terminal test, but not directly usable in your actual codebase. This tool parses the command's method, headers, body data, and basic auth, then generates the equivalent request in 12 languages side by side (Python, JavaScript, PHP, Go, Rust, Java, C#, Ruby, Swift, Kotlin, PowerShell, and Dart), so you can go from "here's the curl example" to working code without hand-translating flags and quoting rules yourself.
It runs a real shell-style tokenizer (handling single quotes, double quotes with escapes, and line continuations with trailing backslashes) rather than naive string splitting, so multi-line curl commands copied straight from documentation parse correctly.
What Gets Translated
Frequently Asked Questions
No - parsing and code generation both happen entirely in your browser using plain JavaScript. Your curl command, including any tokens or credentials in it, is never uploaded or sent to a server.
It covers the flags people actually use for API requests most often: -X/--request, -H/--header, -d/--data (and its variants), -u/--user, -F/--form, -A/--user-agent, and -b/--cookie. Less common flags (like certificate options or proxy settings) are safely ignored rather than causing a parse failure.
Each generator follows that language's own idiomatic pattern for HTTP requests (Python's requests library, JavaScript's fetch, Go's net/http, etc.) rather than forcing one generic structure onto all of them - the goal is code that looks like a human wrote it in that language, not a literal transliteration.
Yes - the tokenizer specifically handles backslash-newline line continuations (the standard way curl examples get split across multiple lines in docs and terminals), so pasting a multi-line example works the same as a single-line one.