How to Test SQLite Queries Online
Test SQLite queries online with a real browser-based SQLite database. Run SELECTs, joins, CTEs, JSON functions, window functions, and schema changes without installing SQLite.
On this page
When you are debugging a SQLite query, the fastest test environment is often a small disposable database rather than your application.
The SQLiz SQLite Playground runs SQLite inside your browser, so you can paste a query, change sample data, and immediately see the result.
No SQLite server is required.
Test a SELECT query
Start with a simple query:
SELECT
department,
COUNT(*) AS employee_count,
ROUND(AVG(salary), 2) AS average_salary
FROM employees
GROUP BY department
ORDER BY average_salary DESC;
Open the SQLite Playground, paste the SQL, and click Run SQL.
The result appears as a table below the editor.
Test multiple statements
You can run schema and data setup together with the query you want to test:
CREATE TABLE orders (
id INTEGER PRIMARY KEY,
customer_id INTEGER NOT NULL,
total NUMERIC NOT NULL
);
INSERT INTO orders (customer_id, total)
VALUES
(1, 19.95),
(1, 42.00),
(2, 17.50);
SELECT
customer_id,
SUM(total) AS total_spent
FROM orders
GROUP BY customer_id;
This is useful for creating a minimal reproducible example.
Test CTEs
SQLite supports common table expressions:
WITH department_totals AS (
SELECT
department,
SUM(salary) AS total_salary
FROM employees
GROUP BY department
)
SELECT *
FROM department_totals
ORDER BY total_salary DESC;
If you are testing a query copied from another database, remember that PostgreSQL, MySQL, SQL Server, Oracle, and SQLite do not support exactly the same syntax.
Test window functions
For ranking queries:
SELECT
name,
department,
salary,
ROW_NUMBER() OVER (
PARTITION BY department
ORDER BY salary DESC
) AS salary_rank
FROM employees;
The SQLite window-function reference has more examples.
Test JSON queries
SQLite includes JSON functions in modern builds.
For example:
SELECT json_extract(
'{"user":{"name":"Ada","active":true}}',
'$.user.name'
);
See SQLite json_extract() and json_each() for additional patterns.
Test UPDATE and DELETE safely
A disposable browser database is useful when you want to inspect the effect of a write statement before using it elsewhere.
For example:
UPDATE employees
SET salary = salary * 1.05
WHERE department = 'Engineering';
SELECT *
FROM employees
WHERE department = 'Engineering';
Reloading the page resets the temporary sample database.
Format the query first
If the SQL is hard to read, use the SQLite SQL Formatter.
Formatting helps expose missing clauses, confusing nesting, and incorrect grouping, although it does not validate the query.
Test against your own database
The playground can also open a local .db, .sqlite, or .sqlite3 file.
For that workflow, see How to Open a SQLite .db File Online.
To start with sample data instead, open the SQLite Playground.