SQL to TypeScript Converter
Generate TypeScript types from SQL CREATE TABLE.Runs in this tab.⌘ ↵ runs it
Next step
AtriumKitFrom the team behind browserutils
Turn a click-through into an interactive demo
AtriumKit records your web app once in Chrome and turns every click into a step of a demo you can embed or share. There’s a free plan.
Try AtriumKit freeAbout SQL to TypeScript Converter
Free online SQL to TypeScript types converter. Parse CREATE TABLE statements and generate TypeScript interfaces with proper type mappings. It runs in your browser. Nothing is sent to a server.
Questions
What SQL types are mapped?
VARCHAR, TEXT→string, INT, BIGINT→number, BOOLEAN→boolean, DATE, TIMESTAMP→string (ISO format), JSON/JSONB→unknown, UUID→string, and more. NOT NULL columns become required properties.
Does it handle multiple tables?
Yes, paste multiple CREATE TABLE statements and each one will generate a separate TypeScript interface.
Is the SQL to TypeScript converter safe for database schemas?
Yes, all parsing runs locally in your browser. No SQL is sent to any server, so your schema definitions and table structures remain private.
How does the converter handle nullable columns?
Columns without a NOT NULL constraint are generated as optional properties with the ? modifier (e.g., middleName?: string), matching how nullable database fields behave in application code.
Does the SQL to TypeScript converter work offline?
Once the page is loaded, all parsing and code generation run in the browser with no network requests.
Comments
More in Code Generators
- Markdown to HTML Converter
- HTML to Markdown Converter
- JSON to TypeScript Converter
- JSON to C# Converter
- JSON to Kotlin Converter
- JSON to Swift Converter
- JSON to Rust Converter
- JSON to PHP Converter
Comments