Skip to content

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.

Ctrl/⌘ + Enter to run
Run your SQL script to view results.

Code runs locally in your browser; it is not uploaded.

How to use

  1. Write SQL statements separated by semicolons.
  2. Create tables and insert sample data in the same script.
  3. 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.

Format references

Tool page updated: