Format & beautify BigQuery SQL online
Format and beautify BigQuery SQL: consistent indentation, aligned clauses, uppercase keywords — and minified one-liners expanded back into readable code.
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.
Beautify minified BigQuery SQL
BigQuery analytics queries get long — nested STRUCTs, ARRAY_AGG, window functions — and dbt or the console often emit them minified. Beautifying spreads the STRUCT fields and clauses across indented lines so the aggregation is legible.
For queries you'll commit into a dbt model, that clean layout matters twice over: it's what your team reviews in the diff and maintains later.
Frequently asked questions
Does the formatter understand BigQuery-specific syntax?
Yes. The query is parsed against BigQuery grammar rather than generic SQL, so BigQuery-only constructs survive formatting: STRUCT/ARRAY, backtick project.dataset.table.
What is the difference between formatting and beautifying BigQuery SQL?
Nothing — they are two names for the same operation. "Format" usually describes tidying SQL you wrote yourself; "beautify" usually describes expanding a minified or ORM-generated one-liner into readable lines. This page does both, with a worked example of each above.
Is my SQL uploaded anywhere?
No. Formatting runs entirely in your browser — the query never leaves your machine and nothing is stored on a server.
Is the BigQuery formatter free?
Yes: free, no account, no usage limit. Only the optional AI features — explain, optimize and dialect conversion — require signing in.