SQLFormatter
FormatterConvertPricingDocsGet Pro
Formatter · BigQuery

Format BigQuery SQL online

Reformat BigQuery queries against BigQuery's own grammar: consistent indentation, aligned clauses and uppercase keywords. Paste one-line or ORM-generated SQL and get structured, reviewable output.

1Paste your BigQuery query into the editor.
2Press Format — or ⌘↵.
3Copy clean, highlighted SQL.
Open formatter
before
select user_id,array_agg(event order by ts) as events from proj.analytics.events where date(ts)=current_date() group by user_id limit 1000;
BigQuery
SELECT
  user_id,
  array_agg(
    event
    ORDER BY
      ts
  ) AS events
FROM
  proj.analytics.events
WHERE
  date(ts) = current_date()
GROUP BY
  user_id
LIMIT
  1000;

Why format BigQuery?

BigQuery's Standard SQL adds STRUCT and ARRAY types, ARRAY_AGG, backtick-quoted `project.dataset.table` references and date functions like CURRENT_DATE(). The formatter parses BigQuery grammar so fully-qualified table names and array constructs survive formatting.

Ideal for the long analytical queries that come out of the BigQuery console or dbt models.

All SQL formatters & beautifiers

Format PostgreSQLBeautify PostgreSQL
Format MySQLBeautify MySQL
Format T-SQLBeautify T-SQL
Format SQLiteBeautify SQLite
Format BigQueryBeautify BigQuery
Format OracleBeautify Oracle
Format SnowflakeBeautify Snowflake
Format RedshiftBeautify Redshift