QueryBase
Free browser SQL workspace on DuckDB-Wasm: import CSV, JSON and Parquet, run joins and aggregations, explore tables and export results. No upload.
Still loading. If the tool doesn’t appear, reload this page.
About this tool
QueryBase
A browser SQL workspace powered by DuckDB-Wasm. Import CSV, JSON and Parquet files, run real SQL with joins and aggregations, explore tables and export results. Your data never leaves your device.
QueryBase is a SQL workspace that runs entirely in your browser. DuckDB-Wasm, the WebAssembly build of the DuckDB analytics database, runs in a Web Worker on this page, so you can drop in CSV, JSON or Parquet files, query them with real SQL (SELECT, WHERE, GROUP BY, JOIN, window functions and more) and look at the results without installing anything or uploading a byte. Every file becomes a DuckDB table you can see in the database explorer with its columns and types, preview or describe. The editor is Monaco, the editor behind VS Code, with syntax highlighting, line numbers, autocomplete for your tables, columns and DuckDB functions, a SQL formatter, and error messages that point at the line that failed. Results appear in a sortable, searchable, paginated grid with timing and row counts, and can be copied or exported as CSV or JSON. Saved queries, query history and workspace settings are kept in your browser with IndexedDB. The engine and the sample data are hosted on this site, the editor's code comes from the jsDelivr CDN, and nothing about your data is sent anywhere.
How to use QueryBase
- 1
Press Import (or drop files anywhere on the workspace) and choose CSV, TSV, JSON, NDJSON or Parquet files. Each file becomes a table; you can also load the sample company data from the sidebar.
- 2
Open the Tables panel to see each table's columns and types. Use the eye button to preview rows, the info button to see the schema, and double-click a name to insert it.
- 3
Write SQL in the editor and press Ctrl+Enter (Cmd+Enter on a Mac) to run it. Select some text to run just that, or press Ctrl+Shift+Enter to run the statement under the cursor.
- 4
Sort, search and page through the results, then copy them or export CSV or JSON. Save queries you want to keep, and find earlier runs in History.
Why use QueryBase
A real database engine in the tab
DuckDB-Wasm runs in a Web Worker, so long queries never freeze the page, and you can stop a running query. Results come straight from DuckDB: nothing is simulated or sampled.
Your data stays on your device
Files are read by DuckDB from your own disk through the browser and are never uploaded. There is no account, key or server: the engine is served from this site and the editor's code from the jsDelivr CDN.
Handles large files
Files are streamed into DuckDB instead of being copied into memory first, so a CSV with millions of rows can be imported without a second copy filling the browser's memory. If the browser runs out of memory you get a clear message and the workspace keeps working. Parquet uses far less memory than CSV or JSON.
A proper SQL editor
Syntax highlighting, line numbers, autocomplete that knows your tables, columns and DuckDB's functions, run selection or the statement under the cursor, format SQL, keyboard shortcuts and error markers on the line that failed.
Explore, then export
Browse tables and column types, preview rows, sort and search the result grid, page through large results, copy rows, and export what you see as CSV or JSON.
Common use cases
- You have a CSV, JSON or Parquet file and want to answer a question about it with SQL, without loading it into a database or a spreadsheet first.
- You want to join two exported files (for example orders and customers), aggregate them and export the result.
- You are learning or teaching SQL and want a real engine with sample data, example queries and clear errors, with nothing to set up.
Frequently asked questions
Is my data uploaded anywhere?
No. Files are read from your device by DuckDB inside the page, and all queries run in your browser. The DuckDB engine (about 36 MB) is downloaded from this site when you first run a query, import a file or load the sample data, the editor's code comes from the jsDelivr CDN, and nothing about your data is sent to any server.
Which file types can I import?
CSV, TSV and text files with delimiters, JSON (an array of objects or one object per line, including NDJSON), and Parquet. Each file becomes a table named after the file, and nested JSON fields become DuckDB STRUCT and LIST columns you can query with dot notation.
What SQL can I use?
DuckDB SQL: SELECT with WHERE, ORDER BY, GROUP BY, HAVING, JOINs, subqueries, CTEs, window functions, UNNEST, date and string functions, CREATE TABLE AS and more. DuckDB's PostgreSQL-like syntax also supports GROUP BY ALL, SELECT * EXCLUDE and friendly errors.
How large a file can I import?
It depends on your device. DuckDB reads the file in a stream, so files of hundreds of megabytes (millions of rows) import quickly on a normal laptop. The browser limits WebAssembly memory to roughly 4 GB, and CSV and JSON take more memory than Parquet. If memory runs out you will see an error and can still keep working.
Why are my tables gone after I reload?
Imported tables live in the browser's memory for the session. Your saved queries, history, editor text and settings are kept in IndexedDB, so you can re-import your files and continue.
How do I stop a long query?
Press Stop (or Ctrl+.) while a query runs. DuckDB cancels it and the workspace stays usable.
Why are results limited to 100,000 rows?
To keep the page fast and the browser's memory safe, the grid keeps the first 100,000 rows of a result and tells you when more exist. Add a LIMIT or a filter, or aggregate in SQL, to see everything you need.
Can I use it on a phone?
Yes. On small screens the explorer opens as a drawer and a switch moves between the editor and the results. Large imports need a device with enough memory.
What is it built on?
DuckDB-Wasm (MIT, by the DuckDB Foundation) for the SQL engine, Monaco Editor (MIT, Microsoft) for the editor and sql-formatter (MIT) for formatting. The engine files are served from this site; the editor loads from the jsDelivr CDN, and a plain text editor takes over if it cannot.