SQL to Kysely Interface Generator
Convert SQL CREATE TABLE statements into type-safe Kysely TypeScript database interfaces with Generated and ColumnType.
At a glance
SQL to Kysely Interface Generator is a free developer utility that transforms SQL CREATE TABLE DDL statements into type-safe Kysely TypeScript database interfaces. It generates Database and Table interfaces with Generated<T> primary keys and ColumnType definitions 100% client-side in browser memory.
100% Client-Side SQL to Kysely Interface Generator
Zero Server UploadsConvert raw SQL CREATE TABLE DDL queries into type-safe Kysely TypeScript database interfaces with Generated and ColumnType directly in browser memory.
Why Use This SQL to Kysely Interface Generator?
How to Use SQL to Kysely Interface Generator
Input SQL DDL
Paste your SQL CREATE TABLE statements or upload a .sql file into the input editor.
Configure Options
Select ColumnType wrapping and import statements generation preferences.
Copy Kysely Interfaces
Copy or download the generated TypeScript Kysely database interfaces immediately.
SQL to Kysely Conversion example
Demonstrates converting an SQL CREATE TABLE statement into type-safe Kysely database and table interfaces.
CREATE TABLE users ( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL );
import type { Generated, ColumnType } from 'kysely';
export interface Database {
users: UsersTable;
}
export interface UsersTable {
id: Generated<number>;
name: string;
created_at: ColumnType<Date, string | undefined, never>;
}
Technical Specifications & Engine Details
| Specification | Details |
|---|---|
| Supported Formats | SQL, TEXT → TYPESCRIPT, TEXT |
| Execution Mode | 100% Client-Side In-Browser (client) |
| Browser Requirements | Modern browser with JavaScript enabled. |
| Performance Constraints | Runs 100% client-side in browser memory. Performance and file limits are bounded only by available device RAM. |
100% Client-Side Privacy Guarantee
Your database DDL statements remain strictly on your local device. Zero data is transmitted to external servers.
Frequently Asked Questions
What is Kysely?
What does Generated<T> mean in Kysely?
Does SQL to Kysely Interface Generator require a database connection?
Methodology
This tool runs entirely in your browser. The example above shows a representative input and the result it produces.
Last updated .