# cURL to C#

Convert curl to C# (HttpClient). Client-side and secret-safe, with guides for HTTP methods, content types and auth schemes.

Paste a curl command and get idiomatic C#. Parsing and code generation happen entirely in your browser.

## Guides

- [Convert a cURL GET request to C#](https://toolpaper.manavdev.site/how-to/curl-get-in-csharp.md): Convert a curl GET command to C# (HttpClient). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL POST request to C#](https://toolpaper.manavdev.site/how-to/curl-post-in-csharp.md): Convert a curl POST command to C# (HttpClient). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL PUT request to C#](https://toolpaper.manavdev.site/how-to/curl-put-in-csharp.md): Convert a curl PUT command to C# (HttpClient). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL PATCH request to C#](https://toolpaper.manavdev.site/how-to/curl-patch-in-csharp.md): Convert a curl PATCH command to C# (HttpClient). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Convert a cURL DELETE request to C#](https://toolpaper.manavdev.site/how-to/curl-delete-in-csharp.md): Convert a curl DELETE command to C# (HttpClient). Paste your command, get idiomatic code — headers, body, auth, and cookies handled.
- [Send JSON with cURL in C#](https://toolpaper.manavdev.site/how-to/send-json-with-curl-in-csharp.md): Convert a curl command that sends JSON into C# (HttpClient). Body serialization, Content-Type, and encoding handled correctly.
- [Send form-urlencoded with cURL in C#](https://toolpaper.manavdev.site/how-to/send-form-with-curl-in-csharp.md): Convert a curl command that sends form-urlencoded into C# (HttpClient). Body serialization, Content-Type, and encoding handled correctly.
- [Send multipart form-data with cURL in C#](https://toolpaper.manavdev.site/how-to/send-multipart-with-curl-in-csharp.md): Convert a curl command that sends multipart form-data into C# (HttpClient). Body serialization, Content-Type, and encoding handled correctly.
- [Send XML with cURL in C#](https://toolpaper.manavdev.site/how-to/send-xml-with-curl-in-csharp.md): Convert a curl command that sends XML into C# (HttpClient). Body serialization, Content-Type, and encoding handled correctly.
- [Send GraphQL with cURL in C#](https://toolpaper.manavdev.site/how-to/send-graphql-with-curl-in-csharp.md): Convert a curl command that sends GraphQL into C# (HttpClient). Body serialization, Content-Type, and encoding handled correctly.
- [cURL with Bearer token in C#](https://toolpaper.manavdev.site/how-to/curl-bearer-auth-in-csharp.md): Convert a curl command using Bearer token to C# (HttpClient). Credentials pass through cleanly and can be redacted before you share.
- [cURL with Basic auth in C#](https://toolpaper.manavdev.site/how-to/curl-basic-auth-in-csharp.md): Convert a curl command using Basic auth to C# (HttpClient). Credentials pass through cleanly and can be redacted before you share.
- [cURL with API key in C#](https://toolpaper.manavdev.site/how-to/curl-api-key-auth-in-csharp.md): Convert a curl command using API key to C# (HttpClient). Credentials pass through cleanly and can be redacted before you share.
- [Convert cURL to ASP.NET](https://toolpaper.manavdev.site/how-to/curl-in-aspnet.md): Convert curl commands into ASP.NET (C# / HttpClient). IHttpClientFactory-registered HttpClient usage.
- [401 Unauthorized in C#](https://toolpaper.manavdev.site/how-to/curl-401-in-csharp.md): The server accepted the request shape but rejected your credentials or scheme. Convert the failing curl into C# (HttpClient) and inspect what's actually being sent.
- [CORS error in C#](https://toolpaper.manavdev.site/how-to/curl-cors-in-csharp.md): curl doesn't enforce CORS. Fetch and Axios do. A working curl doesn't mean a working browser call. Convert the failing curl into C# (HttpClient) and inspect what's actually being sent.
- [SSL certificate error in C#](https://toolpaper.manavdev.site/how-to/curl-ssl-in-csharp.md): Self-signed or expired certs will break in strict clients even though -k made curl happy. Convert the failing curl into C# (HttpClient) and inspect what's actually being sent.

---

Source: https://toolpaper.manavdev.site/curl-to-csharp · Converter: https://toolpaper.manavdev.site/curl-converter