BigQuery SQL Formatter

Paste a BigQuery (GoogleSQL) query and get it formatted instantly. Backtick-quoted `project.dataset.table` paths, STRUCT and ARRAY expressions and @named query parameters are all handled.

BigQuery syntax it handles

A generic formatter mangles dialect-specific syntax or refuses it outright. These are the BigQuery constructs this formatter is tested against.

@name

BigQuery named query parameters are detected and grouped, so a parameter reused across CTEs is filled once.

`project.dataset.table`

Fully-qualified backtick-quoted table paths stay on one piece.

UNNEST(array)

Array flattening keeps its clause structure.

arr[OFFSET(0)]

OFFSET and ORDINAL array subscripts are preserved verbatim.

STRUCT<...>

Struct type declarations are not broken up.

BigQuery formatter FAQ

Does it detect @named parameters?

Yes. BigQuery's @name parameters are listed in the Parameters panel, grouped by name, and can be filled in to produce a runnable query.

Will it mangle my backtick table paths?

No. `project.dataset.table` is treated as a single quoted identifier and passes through unchanged.