cURL Command to Code Converter
Paste a curl command to get the same request as Python requests, Node.js fetch, Go net/http or Rust reqwest. Things curl does implicitly are called out in the output. It runs entirely in your browser.
More from cURLParse
Guides
Frequently Asked Questions
Is my cURL command sent to a server?
No. The parser runs in your browser, so headers, tokens, and request bodies in the command never leave the page. Nothing is ever executed — the tool only reads the command text.
Which languages can cURLParse convert to?
Four: Python with requests, Node.js with fetch, Go with net/http, and Rust with reqwest. Each output is generated from the same parsed representation of your command, so headers, query parameters, and bodies map identically across all four.
Does it run the request or just translate it?
Just translates. The command is parsed, never executed, so an -o, -T, or -b flag in your input cannot cause a file write or a request from this page.
🧭 Pro Tips & Gotchas
Making the most of it
- It reads the curl command token by token, so
-X,-H,-d/--data/--jsonand the URL are all translated into the target language's native request shape — pick Python, Node, Go, or Rust rather than hand-porting. - Multi-line curl with
\continuations is fine; paste the whole block. The parser joins the continuation lines before splitting flags. - Repeated
-H "Set-Cookie: ..."flags accumulate instead of overwriting, which is what you want for multiple headers but easy to double-list by accident. - The generated code preserves your header casing; some HTTP clients canonicalise it, so compare on
toLowerCase()when asserting.
Gotchas
--dataimplies POST. A curl line with--dataand no-Xbecomes a POST in the generated code, even though the command "looks" like a GET to a skimmer.-d @fileand-d @-(stdin) cannot be translated into a standalone snippet — the body has to be inlined or replaced with a placeholder before the code runs.- Form vs JSON matters:
-d "a=1&b=2"is form-encoded and sets nothing else, while--jsonalso addsContent-Type: application/json. Copying only the body into another client loses that header and yields 415/400s. - Shell quoting is not HTTP quoting. Single quotes,
$VARexpansion, and$'...'escapes are resolved by your shell before curl ever sees them, so a snippet copied from history can carry a different body than the rendered code shows. - The snippet inherits no cookies, no redirect following, and no proxy settings. curl's defaults (
-Loff, TLS verification on) differ from many HTTP libraries — set them explicitly in the generated code.