Online PostgreSQL Editor
Write, run, and share code snippets. No setup required.
Run PostgreSQL online on a real database
A free online PostgreSQL editor. Write a query, press Run, and the result appears as a table in seconds. Every run goes to a real PostgreSQL 17 database on Coddy's servers, so you see Postgres answers and Postgres error messages, not an imitation.
The sample employees and departments tables are already loaded, and you can edit them in the grid or paste your own data as CSV, TSV or JSON. Each run starts from a fresh copy of those tables, so INSERT, UPDATE and DELETE never break anything. Good for checking a query before you run it at work, practicing for an interview, or trying out ILIKE, :: casts and JSONB.
What makes this PostgreSQL playground useful
- Real PostgreSQL 17, so
::casts,ILIKE,date_truncand intervals,RETURNING, CTEs, window functions and JSONB all work. - Editable tables: add rows and columns in the grid, or paste CSV, TSV or JSON, then query your own data.
- Several statements in one run: each statement gets its own result, with the rows it returned or the rows it changed.
- Nothing to install: no Postgres server, no psql, no connection string. Download any result as CSV.
What you can try in the PostgreSQL playground
- Filter and sort the sample tables with
WHERE,ILIKEandORDER BY, then joinemployeestodepartments. - Change data and see exactly what changed:
UPDATE employees SET salary = salary * 1.1 WHERE department = 'Sales' RETURNING name, salary;. - Rank salaries per department with
RANK() OVER (PARTITION BY department ORDER BY salary DESC), or stage a query withWITH.
Online PostgreSQL compiler FAQ
Is this online PostgreSQL compiler free?
Yes. The PostgreSQL playground is free, with no database to install and no connection string. Write a query and press Run.
Is it real PostgreSQL?
:: casts, ILIKE, RETURNING, intervals and JSONB works, and errors are PostgreSQL's own messages.Can I use my own tables?
Yes. Edit the sample tables in the grid, add rows and columns, or paste your data as CSV, TSV or JSON. Each run starts from the tables as they are on the page, so nothing you run changes them for the next run.
Does the PostgreSQL editor work on a phone?
Yes. The editor and the table grid work in desktop, tablet and phone browsers.
How do I learn PostgreSQL after trying the playground?
SELECT and goes to joins, window functions and JSONB, with every query checked on a real PostgreSQL database.Useful tools for PostgreSQL
Free, browser-based tools that pair well with the PostgreSQL Playground, all part of Coddy.