Free tool · runs in your browser

Postgres Playground

A real PostgreSQL database, compiled to WebAssembly, running entirely inside this tab. Create tables, run joins and window functions, and your data is saved locally between visits. Nothing is uploaded.

🔒 Runs locally — your data never leaves your device Booting Postgres…
Run with Ctrl/⌘ + Enter
Booting a PostgreSQL instance in your browser. This downloads about 3 MB once, then it is cached.

How it works

This page loads PostgreSQL itself, compiled to WebAssembly through the PGlite project, and starts it inside your browser tab. When you press Run, your SQL is handed to a genuine Postgres query planner and executor, not a re-implementation. That is why SELECT version() returns a real PostgreSQL 18 build, and why joins, CTEs, window functions, generated columns, JSON operators, and transactions all behave exactly like they do on a server.

Your tables and rows are written to your browser's IndexedDB, so the database is still there when you come back tomorrow. There is no server, no connection string, and no account. You can wipe everything instantly with Reset database.

Why run Postgres in the browser?

It is the fastest way to try an idea. There is nothing to install, no Docker, no brew, no waiting for a cloud instance to spin up. It is ideal for learning SQL, sketching a schema, testing a tricky query before you run it for real, or sharing a reproducible example: paste your setup SQL, copy the share link, and the person who opens it gets the exact same query loaded and ready to run on their own private database.

Things to try

  1. Click Load sample dataset for a small store schema, then run the join that is pre-loaded in the editor.
  2. Write a window function: SELECT name, price, rank() OVER (ORDER BY price DESC) FROM products;
  3. Use a CTE and generate_series to build a numbers table.
  4. Create your own tables, insert rows, reload the page, and watch your data still be there.
Is this really PostgreSQL?

Yes. It is the actual Postgres engine compiled to WebAssembly, not a clone. SELECT version() reports a genuine PostgreSQL 18 build. It runs as a single-connection embedded database, so it is perfect for development and learning rather than serving production traffic.

Is my data uploaded anywhere?

No. The whole database runs in your browser. Your schema and rows are stored locally in IndexedDB and never touch a server, which is why it works offline once the engine has loaded.

Will my data still be here after I close the tab?

Yes, it persists in your browser's IndexedDB. Use Reset database to start fresh. Clearing your browser site data will also remove it.

How big is the download?

About 3 MB gzipped for the Postgres WebAssembly build. It downloads once and is then cached, so repeat visits start quickly.

What can it not do?

It is a single embedded instance, so there are no multiple concurrent connections or replication. Some server-only features and extensions are unavailable, but core SQL, transactions, and most data types work just like a normal Postgres.

I build tools like this every day.

Senior full-stack engineer, available for senior or contract work, fully remote. See the rest of the lab or get in touch.