Next-generation Node.js and TypeScript ORM

Prisma helps app developers build faster and make fewer errors with an open source database toolkit for PostgreSQL, MySQL, SQL Server, SQLite, MongoDB and CockroachDB.

code example
  • Gatsby logo
  • Rapha logo
  • Poppy logo
  • Twiga logo
  • Panther logo
  • Grover logo
  • Invisible logo
  • Elsevier logo
Prisma Schema

Data model
you can read

Central to Prisma is the schema - a declarative way to define your app's data models and their relations that's human-readable. And you don't have to painstakingly create it from scratch if you already have a database - prisma introspect takes care of that.

1datasource db {
2 provider = "sqlite"
3 url = env("DATABASE_URL")
6generator client {
7 provider = "prisma-client-js"
10model Post {
11 id Int @id @default(autoincrement())
12 title String
13 content String?
14 published Boolean @default(false)
15 author User? @relation(fields: [authorId], references: [id])
16 authorId Int?
Check out an example schema
1await prisma.user
2 .findUnique({
3 where: { email: '' }
4 })
5 .posts({
6 where: {
7 title: {
9 }
10 }
11 })
Prisma Client

database client

Prisma Client is a query builder that composes the way you think and gets auto-generated from the Prisma schema with types tailored to your app. We designed the API to be intuitive for both SQL veterans and people brand new to databases.

Icon for Visual Studio Code application

Extra ergonomy in Visual Studio Code

Auto-completion, linting, formatting and more help Prisma developers in VSCode stay confident without distractions.

Download the Prisma VSCode Extension
Typescript language logo

Make fewer errors with TypeScript

Prisma Client puts extra emphasis on extensive type safety for more productive development in TypeScript.

Type definitions in Prisma Client
Seamless Relation API
Advanced Pagination
Declarative Nested Writes
Raw Database Access
Sorting and Filtering
Transaction API
Aggregation API
Case-insensitive Mode
Select Distinct
Helpful Error Messages
SQL Query Logging
JSON Field Support
Native Database Types
Middleware Support
Custom Generators
Explore the Prisma Client Documentation
diagram showing model schema evolution
Prisma Migrate

Hassle-free migrations

Based on the Prisma Schema, Prisma Migrate automatically generates SQL database migrations, that are fully customizable. For quick data model prototyping in development,prisma db push lets you make changes to the database without generating migration files.

Learn more
$ npx prisma migrate
Interface sketch and icon of Prisma studio
Prisma Studio

Visual database browser

The easiest way to explore and manipulate data in your Prisma projects. Understand your data by browsing across tables and their relations and edit them with safety. Available for macOS, Windows and Linux.

$ npx prisma studio

How does Prisma fit into your stack?

Prisma is a server-side library that helps your app read and write data to the database in an intuitive and safe way.

Diagram of Prisma in the Server part of Client - Server - Database stack
From development to production

Prisma in your application lifecycle

application lifecycle


Model your data in the Prisma schema with ease and in a human-readable format.


Query your data in an intuitive and type-safe way with Prisma Client.


Follow our guides for best practices on unit and integration tests with Prisma.


Prisma works with all deployment paradigms, from traditional servers to containers, to serverless.


Learn how to monitor and spot performance bottlenecks in your database queries.


Troubleshoot issues with your database when your application is running in production.

Engage with Prisma Developers

Join the thriving Prisma community

Prisma on Youtube - Livestreams, Events, Tutorials and Talks

Prisma’s YouTube channel is the headquarters for new weekly videos, livestreams, and meetups with Prisma folks and audience members.

Slack logo

Join 40,802 fans on Slack

Engage with a vibrant community of developers and companies adopting Prisma

GitHub logo


Browse the Prisma source code, send feedback or join the discussion on GitHub.