About this GraphQL schema to C# generator
Turn a GraphQL schema (SDL) into C# types: object and input types become classes or records, interfaces and unions become C# interfaces, and enums become C# enums. Non-null fields are marked required and nullable fields use nullable types.
How to use the GraphQL to C#
- Paste your GraphQL SDL.
- Choose classes or records.
- Generate and copy the C# code.
Example
type User { id: ID! name: String } → public class User { public required string Id { get; set; } public string? Name { get; set; } }Frequently asked questions
How are custom scalars mapped?
Common scalars like DateTime, Date, UUID and Decimal map to their .NET types; other custom scalars map to string.
Is my data safe?
Yes. The tool runs entirely in your browser using WebAssembly. Nothing you type or upload is sent to a server, logged or stored.
Is it free?
Yes, completely free with no sign-up, no limits and no watermarks. It also works offline once the page has loaded.