About the PGlite (PostgreSQL) compiler
Full PostgreSQL running in your browser via WebAssembly. No server needed. Run PGlite (PostgreSQL) code in your browser with no install and no signup — the editor, the input and the output share one screen. PGlite (PostgreSQL) compiles and runs on your own device through WebAssembly, so once the page has loaded it keeps working without a network connection.
Press Run to execute the program, edit it and press Run again, or paste your own code over it. Everything you type stays in the page; the editor caches your work locally so a reload does not lose it.
A PGlite (PostgreSQL) example
This is the program the PGlite (PostgreSQL) editor opens with — run it as it is, then change it.
-- PGlite: PostgreSQL in Browser (WASM)
-- Runs entirely in your browser, no server needed!
CREATE TABLE employees (
id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
department VARCHAR(50),
salary NUMERIC(10, 2),
hire_date DATE DEFAULT CURRENT_DATE
);
INSERT INTO employees (name, department, salary) VALUES
('Alice', 'Engineering', 95000),
('Bob', 'Marketing', 72000),
('Charlie', 'Engineering', 88000),
('Diana', 'Sales', 65000),
('Eve', 'Engineering', 102000);
-- Window functions (PostgreSQL feature!)
SELECT
name,
department,
salary,
RANK() OVER (PARTITION BY department ORDER BY salary DESC) as dept_rank,
salary - AVG(salary) OVER (PARTITION BY department) as diff_from_avg
FROM employees
ORDER BY department, salary DESC;
The editor opens with the full program.
More Databases compilers
Browse all 109 languages — the same editor runs each of them, in the browser or on a shared runner.