Paste a CREATE TABLE statement, get a ready-to-use TypeScript interface.
Open the SQL → TypeScript Generator →Keeping frontend types in sync with a database schema is tedious by hand. MetaDataLoop's SQL-to-types tool parses your CREATE TABLE statement and emits a TypeScript interface per table — numeric columns become number, booleans become boolean, and nullable columns are marked optional and unioned with null.
Sample values and the dialect-native type they map to.
| Sample value | Inferred type |
|---|---|
| INT, BIGINT, SERIAL | number |
| DECIMAL, NUMERIC, FLOAT | number |
| BOOLEAN, BIT | boolean |
| VARCHAR, TEXT, DATE, UUID | string |
| JSON, JSONB | Record<string, unknown> |
| nullable column | field?: type | null |
CREATE TABLE users ( id UUID PRIMARY KEY, email VARCHAR(255) NOT NULL, full_name VARCHAR(120), created_at TIMESTAMP NOT NULL );
export interface Users {
id: string;
email: string;
fullName?: string | null;
createdAt: string;
}
No signup, no install — runs entirely in your browser.
Open the SQL → TypeScript Generator →