Turn cURL requests into C# HttpClient or JavaScript Fetch code.
YOUR TOOL · YOUR NEXT STEP
cURL to C# / JS Fetch — see the details.
Convert cURL commands to C# HttpClient and JavaScript Fetch code in your browser. Free, private, with headers, JSON and authentication support.
DEVELOPER UTILITIES · FREE BROWSER TOOL
From cURL to ready-to-use code.
Turn an HTTP request into C# HttpClient or JavaScript Fetch. Paste, convert, copy.
✓ Runs locally in your browser✓ No requests sent✓ No account required
01 / Your cURL request
Use POSIX quotes and \ line continuations. Remove real credentials before sharing generated code.
02 / Generated code
.NET 6+ · Console application
Keep the request details
Convert methods, headers, inline request bodies, JSON, form data and Basic authentication. GET query parameters are supported with -G. Inline --data-urlencode values support spaces, Unicode and special characters for query strings and form bodies.
Frequently asked questions
Which cURL options are understood?
The ones that describe the request: method, headers, body data, JSON, basic authentication and form fields. Transport and diagnostic flags such as verbosity, retries or proxy settings have no direct equivalent in the generated code and are ignored.
Is my API key sent anywhere?
No. The conversion runs entirely in your browser and the request is never executed, so headers and tokens in the command stay on your machine. Still, rotate any key you have pasted into a shared screen or ticket.
Is the generated code ready for production?
It reproduces the request faithfully, but production code also needs timeouts, error handling and a reused HttpClient or fetch wrapper rather than a fresh one per call. Take it as a correct starting point, not a finished class.
Private by design
Your command stays in this page. This tool does not execute cURL, contact the target URL or save your input.
Know the limits
File uploads, multipart forms, shell variables and unsupported flags produce an explicit error. Browser Fetch still follows CORS rules. Review the output before using it.
How do I use the generated code?
Choose a language and copy the result. C# output targets a .NET 6+ console app. Fetch output uses top-level await in a JavaScript module, or can be placed inside an async function.
Does this send my API request?
No. Conversion only produces text. Requests run when you execute the generated code in your own environment.