Use this tool to run SQL statements to create CSV, JSON, or an HTML table.

Use this tool to output CSV data from SQL statements. Your SQL statements MUST include a CREATE TABLE statement and INSERT statements to load the data. The very last line MUST include at least one SELECT statement. Each SELECT statement will produce data. Please use a plain version of CREATE TABLE with no additional keywords. Use semi-colon as the SQL statement terminator.
Convert SQL to JSON. Convert SQL to HTML Table.New
NOTE - This page requires a modern browser - IE10+, latest Firefox, Chrome, ....
This page uses client-side SQLite via sql.js. Use site SQLite for SQL syntax, though most SQL dialects run fine.
See also CSV to SQL and See also JSON to SQL

Step 1: Select your input

Enter SQL statements including CREATE TABLE statement, INSERT(s), and at least one SELECT.
Only SQLITE syntax is supported. In the example below, the SELECT statement is:
SELECT * FROM employees WHERE id < 10 ORDER BY name;

Step 2: Generate output

Output Field Separator: