Task path / input to outcome
How to format SQL without executing it
- 01
Choose the SQL dialect
Select Standard SQL, PostgreSQL, MySQL, SQLite, SQL Server, BigQuery, or Snowflake so dialect-specific syntax is tokenized correctly — PostgreSQL is the default. There is no autodetection: pick the dialect your database actually speaks, because a clause that formats cleanly under Standard SQL can read differently once the correct dialect owns the keywords.
- 02
Paste and format immediately
Paste or type up to 256 KiB of SQL. A paste runs at once, ordinary edits re-run after a short pause while Auto-format is on, and Ctrl or Command plus Enter applies the current options on demand. The workspace opens with a sample join query, so you can watch the formatter work before trusting it with production SQL.
- 03
Choose readable or compact output
Compact preserves line breaks, comments, literals and token separators. PostgreSQL assumes standard_conforming_strings=on; MySQL assumes default backslash escaping. Database session modes are not detected. Formatting would change quoted content, comments or literal line boundaries. Try Compact mode or adjust the SQL; no partial result is exported.
- 04
Check the result and byte counts
The output pane updates with each run, and the footer reports the exact input and output byte counts so the cost of readability — or the savings from compacting — is visible. Runs execute in a Web Worker with a reviewed 1,500 ms budget, formatted output is capped at 512 KiB, and a statement the tokenizer cannot handle stops with its line and column named.
- 05
Review, copy, or download
Review the result against your database version, then copy it to the clipboard or download it as toolars-formatted.sql. Formatting does not replace database validation: the workspace never connects to a database, so confirm object names, permissions, and semantics where the query will actually run. Cancel stops the current run and turns off Auto-format while keeping SQL. Editing SQL or options clears the previous output.