Drizzle ORM Schema Generator
Generate a Drizzle ORM table definition from any JSON sample.
Generated Schema
import { pgTable, serial, text, timestamp, boolean, real } from "drizzle-orm/pg-core";
export const users = pgTable("users", {
id: serial("id").primaryKey(),
email: text("email").notNull().unique(),
name: text("name"),
createdAt: timestamp("created_at").defaultNow(),
active: boolean("active").default(false),
score: real("score"),
});
export type User = typeof users.$inferSelect;
export type NewUser = typeof users.$inferInsert;About Drizzle ORM Schema Generator
Paste any JSON object and instantly get a Drizzle ORM table definition ready to drop into your TypeScript project. Supports PostgreSQL (pg-core), MySQL (mysql-core), and SQLite (sqlite-core) with appropriate type mappings. Field names are automatically converted from camelCase to snake_case, and common patterns like id, email, and createdAt receive smart defaults such as .primaryKey(), .notNull().unique(), and .defaultNow(). Copy or download the result as a .ts file.
Private & free — this tool runs entirely in your browser.
Related Developer Utilities tools
RegExp Tester
Test regular expressions and inspect matches locally.
Regex Visualizer
Visual regex pattern diagram with live match highlighting and capture group annotations.
Subnet Calculator
Compute CIDR subnets, usable hosts, and network ranges.
Cron Parser
Translate cron syntax into plain English.
URL Parser
Break a URL into protocol, host, path, and query parts.
HTML Previewer
Paste HTML and see it rendered live in a safe, sandboxed preview.
HTTP Status Code Reference
Search and look up every HTTP status code and its meaning.
MIME Type Lookup
Find the MIME type for a file extension, or the extensions for a MIME type.