PostgreSQL Playground
Practise SQL on real PostgreSQL in your browser. Nothing is uploaded.
- 1Write a SQL query
- 2Press Run
- 3Want your own data? Import a file
About the PostgreSQL Playground
Practise PostgreSQL online without installing a server. The playground runs real PostgreSQL, compiled to WebAssembly (PGlite), inside your browser tab. It starts with a small shop database (customers, products, orders and order_items), and you can import your own CSV, JSON or .sql files.
It is meant for learning SQL, testing queries and exploring small datasets. It is not a hosted database, so applications cannot connect to it, and the data is cleared when you reload the page.
Questions
Is this real PostgreSQL?
Yes. It is PostgreSQL 16 compiled to WebAssembly (PGlite), running in your browser. Standard SQL, JSONB, window functions, CTEs and PL/pgSQL work as they do on a server. Network features such as replication, user logins and most extensions are not available.
Can I connect to it from Java, Python or another program?
No. The playground is not a hosted database: there is no server, port or connection string. Java, Python, Node.js, Go, JDBC or ORM code cannot connect to it. Queries run only from the editor on this page.
Is my data uploaded?
No. The database runs inside your browser tab. Your queries and imported files never leave your device.
How much data can I load?
Small to medium files work best, up to a few tens of megabytes. Larger files are limited by your browser's memory.
Is my data saved?
No. Reloading the page resets the database. The text in the editor is kept in your browser so you can continue writing.
More playgrounds
pgvector Playground · SQLite Playground · DuckDB Playground · Mongo Query Playground · PostgreSQL Query Performance Lab · JSON Query (SQL on JSON) · All playgrounds
