Online SQL Editor (SQLite / PostgreSQL)
Write and run SQL online with SQLite or PostgreSQL. Create tables, insert data and see SELECT results as tables. Free, runs in your browser, no setup.
SQLite
Code runs locally in your browser; it is not uploaded.
How to use
- Write SQL statements separated by semicolons.
- Create tables and insert sample data in the same script.
- Press Run to see each SELECT result as a table.
Example
-- SQL example
CREATE TABLE fruits (name TEXT, price REAL);
INSERT INTO fruits VALUES ('Apple', 1.2), ('Banana', 0.5), ('Cherry', 3.0);
SELECT name, price FROM fruits WHERE price > 1 ORDER BY price DESC;
Details and limitations
Choose SQLite (sql.js) or PostgreSQL (PGlite). A fresh in-memory database is created each run; data is not kept between runs.
Each result shows up to 1,000 rows. Both engines run in your browser without connecting to an external database.
FAQ
Is my data saved?
No. The database lives in memory and is recreated on each run. Include your CREATE and INSERT statements in the script.
Can I run multiple queries?
Yes. Run several statements at once; each SELECT gets its own result table.
Which database engines are available?
Choose SQLite via sql.js or PostgreSQL via PGlite. Syntax and supported features depend on the selected engine; external database connections are not supported.
Related tools
Format references
- SQLite — SQL language
- sql.js — SQLite compiled to WebAssembly
- PGlite — PostgreSQL in WebAssembly
- PostgreSQL — SQL language
Tool page updated: