Online SQL compiler

This runs your query on a real database inside your browser tab. Your code never leaves this tab.

query.sqlDuckDB-WASM

Press Run. The DuckDB-WASM engine (about 5 MB) downloads once on your first run, then stays cached.

SQL · runs in your browser · nothing uploadedLn 1, Col 1

// Free tool

This runs your query on a real database inside your browser tab - DuckDB compiled to WebAssembly, not a syntax checker and not a shared server. Write SELECTs, JOINs, CTEs and window functions, press Run, and read the rows back in a few milliseconds.

Nothing you type is sent to a server. Your code is saved only in this browser, the engine is downloaded once and cached, and once it has loaded the page keeps running your code with the network off. No account, no sign-in, no limit on how many times you press Run.

// What you get

DuckDB-WASM, in a browser tab

DuckDB compiled to WebAssembly - the same analytical database engine the graded SQL practice runs on.

What it supports

  • The full DuckDB SQL dialect: CTEs, window functions, QUALIFY, LATERAL joins, list and struct types, and the PostgreSQL-compatible function set.
  • Multiple statements in one run. CREATE TABLE, INSERT and UPDATE work, and the tables live until you reload the page.
  • Result sets rendered as a table, with the row count and how long the statement took.

What it does not

  • No files and no network: ATTACH, COPY and httpfs cannot reach a disk or a URL from here.
  • A statement is stopped at 10 seconds. That is usually a join with no condition or a recursive CTE with no termination.
  • Everything is in memory, and a reload is a fresh database.

// Why it runs here

Your code never leaves the tab

Most online compilers send your code to a server, run it in a container, and send the output back. That means a queue when the site is busy, a hard cap on how long your program may run, and a copy of your code on someone else's disk. This one downloads the compiler instead, once, and runs everything locally from then on.

No upload, no account

  • The compiler is fetched once and cached; your source is never sent anywhere.
  • Nothing is stored on our side. Your code is kept in this browser only, so it is still here when you come back.
  • Once the engine has loaded, it keeps running with the network off, which a hosted sandbox cannot do.

Then practice it for real

  • A runner tells you what your code printed. It cannot tell you whether you have learned anything.
  • Prepshotz runs the same engines against real test cases and grades the result.
  • Practice SQL with graded problems →

// Questions

SQL in the browser - FAQ

01Which SQL dialect does this run?

DuckDB SQL, which is close to PostgreSQL and covers the standard analytical surface: CTEs, window functions, QUALIFY, and the usual string, date and aggregate functions. Queries written for Postgres usually run unchanged; MySQL-only or T-SQL-only syntax will not.

02Can I create my own tables?

Yes. CREATE TABLE and INSERT work exactly as they would locally, and the tables stay available for the rest of the session. Reloading the page gives you an empty database again.

03Does my code get uploaded anywhere?

No. The compiler runs inside your browser tab, so your code never leaves your machine. There is no server to send it to and nothing is logged on our side. Your code is kept only in this browser, and a share link carries it inside the link itself.

04Is it really free, and do I need an account?

Yes, and no. Every tool here runs without an account, a card, or a sign-in. They are free because they cost us nothing per run: the compiler is downloaded to your browser once and your own machine does the work.

05Does it work offline?

Once the engine has loaded, yes: the page keeps running your code with the network off, because nothing it does needs a server. Opening the page needs a connection, but the engine stays cached, so a later visit skips the download.

Run SQL here. Get graded on it there.

Free while we're in beta.