PGlite is a WebAssembly build of Postgres packaged as a TypeScript client library that runs Postgres in browsers, Node.js, Bun, and Deno without external dependencies.
The tool solves the problem of needing a full database server by embedding Postgres directly into JavaScript environments. Since WebAssembly cannot fork processes like traditional Postgres does, PGlite operates in single-process mode, compiling Postgres to WASM using Emscripten. The library is distributed as a 3mb gzipped package and supports many Postgres extensions including pgvector and PostGIS. It can run as an ephemeral in-memory database or persist data to indexedDB in browsers or the file system in Node.js, Bun, and Deno.
Developers should choose this tool when building local-first, reactive applications that benefit from having a real Postgres instance available client-side without server infrastructure. It suits projects needing offline-capable databases, edge computing scenarios, or applications where embedding a full relational database in the client makes sense. The approach differs from previous "Postgres in the browser" projects by avoiding Linux virtual machines entirely and running actual Postgres compiled to WebAssembly.
The project maintains active engagement through a Discord community channel and social media presence. Development activity shows ongoing work across multiple runtime environments and storage backends, with support for various Postgres extensions indicating sustained feature expansion. The tool carries an alpha status designation, reflecting its position as a maturing project still subject to changes.