What is Drizzle ORM?
Drizzle ORM is a lightweight, headless TypeScript ORM designed for developers who want the full power of SQL with complete type safety. At only ~7.4kb minified+gzipped with zero dependencies, Drizzle is optimized for modern JavaScript runtimes and serverless environments.Drizzle is not just another ORM - it’s a thin, typed layer on top of SQL that preserves SQL’s expressiveness while adding TypeScript’s type safety.
Core philosophy
Drizzle is built on three fundamental principles:SQL-like
Write queries that look and feel like SQL, not an abstraction layer
Type-safe
Full TypeScript inference with compile-time validation
Lightweight
Zero dependencies, tree-shakeable, optimized bundle size
Why choose Drizzle?
Serverless-ready by design
Drizzle works seamlessly in every major JavaScript runtime:- Node.js
- Bun
- Deno
- Cloudflare Workers
- Supabase Edge Functions
- Vercel Edge Runtime
- AWS Lambda
- Browser environments
Universal database support
Drizzle supports all major SQL databases with native drivers:- PostgreSQL
- MySQL
- SQLite
- PostgreSQL (pg, postgres.js, node-postgres)
- Neon Serverless
- Vercel Postgres
- Supabase
- AWS Data API
- PGlite
- Electric SQL
Performance first
Drizzle is designed for speed:- Minimal overhead: Direct SQL execution with minimal abstraction
- Prepared statements: Reusable queries for optimal performance
- Query batching: Execute multiple queries efficiently
- Tree-shakeable: Only bundle what you use
Check out our benchmarks to see how Drizzle compares to other ORMs.
Type safety in action
Drizzle provides end-to-end type safety from schema definition to query results:- Autocomplete for all columns and methods
- Type errors for invalid queries at compile time
- IntelliSense for available operations
- Refactoring support when schema changes
Key features
SQL schema declaration
Define your database schema in TypeScript with a declarative, type-safe API:Relational and SQL-like queries
Write queries in two styles based on your preference:Automatic migrations
Drizzle Kit generates SQL migrations automatically from your schema changes:Ecosystem
Drizzle comes with powerful companion tools:Drizzle Kit
CLI for migrations, schema introspection, and database management
Drizzle Studio
Visual database browser to explore and edit data
Drizzle Seed
Generate realistic test data for development
Schema Validation
Integrate with Zod, Valibot, TypeBox, and ArkType
Real-world usage
Drizzle is trusted by thousands of developers and companies building production applications:- Serverless applications on Cloudflare Workers, Vercel Edge, AWS Lambda
- Full-stack applications with Next.js, Remix, SvelteKit, Astro
- Mobile apps with React Native and Expo
- Desktop apps with Electron and Tauri
- CLI tools and scripts
Next steps
Installation
Install Drizzle ORM and set up your project
Quickstart
Build your first Drizzle application in minutes
Schema Declaration
Learn how to define your database schema
Queries
Write type-safe queries with Drizzle
New to SQL? Drizzle’s type-safe API makes SQL approachable while teaching you proper database concepts. You’ll learn SQL naturally as you use Drizzle.