Description
PGlite is a lightweight, embeddable build of Postgres that runs in the browser or any JavaScript environment through WebAssembly. The site describes it as a complete Postgres build under 3 MB gzipped, so a real database can run inside your app without a separate server. Extensions can be loaded dynamically, including pgvector and PostGIS, and the site has a playground where you can try more extensions. It includes support for live queries, data loading and synchronisation, and it has framework hooks for React and Vue, along with bundler support, a multi-tab worker, a socket server and tools for ORMs and query builders. Sync with Postgres uses Electric's Postgres Sync. The docs cover the API, filesystems, extensions and a catalogue of extensions. PGlite is dual-licensed under the Apache 2.0 licence and the PostgreSQL License, and its source is on GitHub. It is aimed at developers who want Postgres inside their own app.…
Highlights
- Full Postgres running in WebAssembly
- Under 3 MB gzipped
- pgvector and PostGIS extensions
- Live queries and sync
- React and Vue framework hooks
Ratings & Reviews
No ratings yet
Be the first to rate PGlite.
People also visit
PowerSync: Backend DB
For Postgres, MongoDB, MySQL, SQL Server, Azure DocumentDB
PGlite FAQ
What is PGlite?
PGlite is a WebAssembly build of Postgres that you can embed in an app. It runs a full Postgres database locally in the browser or another JavaScript environment.
Can I use pgvector?
Yes. The site says PGlite includes pgvector and supports dynamic loading of extensions, including PostGIS.
What is the license?
PGlite is dual-licensed under the Apache 2.0 licence and the PostgreSQL License.
How do I start?
Use the Get Started guide, install the package from npm, or try the REPL on the site to run a full PGlite Postgres in your browser.
What are the best PGlite alternatives?
Popular alternatives to PGlite include pgweb, Pgpad and PowerSync: Backend DB. See all PGlite alternatives



