About this SQL to C# class generator
Generate C# classes or records from SQL CREATE TABLE statements. Column types from SQL Server, PostgreSQL, MySQL and SQLite are mapped to C# types, and nullable columns become nullable properties, ideal for Entity Framework Core or Dapper models.
How to use the SQL to C# Class
- Paste one or more CREATE TABLE statements.
- Choose class or record output.
- Copy the generated C# code.
Example
CREATE TABLE Users (Id INT NOT NULL, Name NVARCHAR(50) NULL) → public class Users { public int Id { get; set; } public string? Name { get; set; } }Frequently asked questions
Which SQL types are supported?
Common numeric, text, date/time, boolean, GUID/uuid and binary types across the major databases are mapped to their C# equivalents.
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.