Skip to main content

TypeORM

Code with Confidence. Query with Power.

TypeORM Logo

Flexible Patterns

Supports both DataMapper and ActiveRecord patterns, giving you the flexibility to choose what works best for your project.

TypeScript First

Built from the ground up with TypeScript support, providing complete type safety for your database models.

Multi-Database Support

Works with MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB, and more.

Powerful QueryBuilder

Elegant syntax for building complex queries with joins, pagination, and caching.

Migrations & Schema

First-class support for database migrations with automatic generation.

Cross-Platform

Works in Node.js, browsers, mobile, and desktop applications.

Elegant, Type-Safe API

TypeORM provides a beautiful, simple API for interacting with your database that takes full advantage of TypeScript's type system. Choose between DataMapper and ActiveRecord patterns - both are fully supported.

Entity Definition
Data Mapper
Active Record
import { Entity, PrimaryGeneratedColumn, Column } from "typeorm"

@Entity()
export class User {
@PrimaryGeneratedColumn()
id: number

@Column()
firstName: string

@Column()
lastName: string

@Column()
age: number
}

Supported Databases

CockroachDB logo
CockroachDB
Google Spanner logo
Google Spanner
MariaDB logo
MariaDB
MongoDB logo
MongoDB
MS SQL Server logo
MS SQL Server
MySQL logo
MySQL
Oracle logo
Oracle
PostgreSQL logo
PostgreSQL
SAP HANA logo
SAP HANA
SQLite logo
SQLite

All logos are trademarks of their respective owners, used for identification purposes only.

Works Everywhere

TypeORM runs in NodeJS, Browser, Cordova, Ionic, React Native, NativeScript, Expo, and Electron platforms.

NodeJS Browser Mobile React Native Electron

Maintained By

Michael BromleyDavid HöckLucian MocanuNaor PeledGiorgio BoaPiotr KuczynskiMohammed GomaaJulian PuflerSimon GarnerPieter WigboldusMike Guida
Meet the Team

Ready to Get Started?

TypeORM makes database interaction a breeze. Join thousands of developers who are already building better applications with TypeORM.