BigQuery Formatter

Paste a BigQuery query and get it laid out clause by clause — with Google BigQuery syntax handled correctly.

Input · drop a file

Output

BigQuery-specific syntax this formatter understands

  • Backtick table paths like `project.dataset.table` stay whole
  • Array access ([OFFSET(1)]), STRUCT and UNNEST are handled
  • QUALIFY and EXCEPT/REPLACE in SELECT * are supported
  • Named parameters like @start_date are kept intact

Formatting changes only whitespace and keyword case. What the query does is unchanged. Need another database? The main SQL formatter has 11 dialects, and the SQL minifier squeezes a query onto one line.

Questions

Is this BigQuery formatter free and private?

Yes. It runs in your browser using the open-source sql-formatter library; your query is never uploaded.

Does it change my query’s cost?

No. Formatting changes only whitespace and keyword case, never what BigQuery scans.

Does it check my query against my schema?

No — it understands the syntax, not your tables. A nicely formatted query can still reference a column that doesn’t exist.

Related tools