Skip to content

SQL to TypeScript Converter

Embed

Paste this where you want SQL to TypeScript Converter on your site. Adjust the height to fit.

<iframe src="https://www.browserutils.dev/embed/sql-to-typescript/" width="100%" height="500" frameborder="0" loading="lazy" title="SQL to TypeScript Converter"></iframe>
<p style="font-size:12px;margin:4px 0 0"><a href="https://www.browserutils.dev/tools/sql-to-typescript/">SQL to TypeScript Converter</a> by BrowserUtils</p>

Generate TypeScript types from SQL CREATE TABLE.Runs in this tab.

Next step

About 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.

More in Code Generators

All 26 code generators