Skip to content
ZeroServer.tools

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.

IndieKitShip your Next.js startup in days.affiliate

Related Developer Utilities tools