ADVERT
SQL to TypeScript
Paste SQL CREATE TABLE statements and generate TypeScript interfaces for your data models. Runs in your browser with no sign-up required.
How to use this tool
- Paste one or more CREATE TABLE statements.
- Review parsed columns and diagnostics in the preview table.
- Copy or download generated TypeScript declarations.
Parser behavior
- Supports multiple CREATE TABLE blocks in one pass.
- Maps precision and array types to practical TS equivalents.
- Carries REFERENCES hints into comments and preview columns.
Manual follow-up
- Adjust unknown or custom SQL types flagged in diagnostics.
- Refine enum unions when SQL dialects use custom patterns.
- Model join relations and derived views separately.
FAQ
- Does this support multiple tables?
- Yes. It parses multiple CREATE TABLE statements and emits one model per table.
- Are foreign keys represented?
- Reference targets are surfaced as hints and comments, not full ORM relations.
- What happens with unknown SQL types?
- They default to string and are listed in diagnostics so you can correct mappings manually.
ADVERT
ADVERT