PGlite Brings Full Postgres to Browsers and Runtimes in a 3MB WASM Package

Aug 12, 2026
GitHub
Article image for PGlite Brings Full Postgres to Browsers and Runtimes in a 3MB WASM Package

Summary

PGlite delivers a fully functional Postgres database directly in browsers and JavaScript runtimes as a tiny 3MB WASM package, supporting persistent storage, pgvector, PostGIS, and zero dependencies.

Key Points

  • PGlite is a lightweight, 3mb gzipped WASM build of Postgres packaged as a TypeScript library, enabling Postgres to run directly in browsers, Node.js, Bun, and Deno with zero additional dependencies.
  • It supports both ephemeral in-memory storage and persistent storage via the file system or IndexedDB, and includes extensions like pgvector and PostGIS for advanced use cases.
  • Unlike traditional Postgres, PGlite leverages Postgres's single-user mode alongside Emscripten's WASM compilation to bypass the process-forking limitation, making it single-connection but fully functional for local-first, reactive app development.

Tags

Read Original Article