ARRAY expressions
Array literals, subqueries, offsets, safe offsets, and array functions can nest deeply. Indentation reveals which bracket or subquery belongs to each expression.
GoogleSQL profile · Local worker · No API request
Beautify GoogleSQL with dialect-aware handling for project paths, arrays, structs, UNNEST, named parameters, window functions, and QUALIFY. Your query never reaches BigQuery.
SELECT
user_pseudo_id,
event.key AS parameter_name
FROM `project.analytics.events`,
UNNEST(event_params) AS event
QUALIFY ROW_NUMBER() OVER (
PARTITION BY user_pseudo_id
ORDER BY event_timestamp DESC
) = 1;
GoogleSQL layoutNot submitted or billed
BigQuery query beautifier
The BigQuery profile loads by default. Choose your style, press Format SQL, and review the result without sending the query to a Google Cloud project or a remote formatting service.
Loading the BigQuery SQL formatter…
Enable JavaScript to format GoogleSQL locally. BigQuery syntax and review guidance remains readable below.
Readable queries without a cloud round trip
Keep the original in version control and remove secrets or sensitive identifiers where practical. The editor accepts a query or script up to the documented local limit.
Backticks occur in both BigQuery and MySQL, so punctuation alone is not reliable detection. Choose GoogleSQL because BigQuery is the actual target.
Diff the formatted text, then use BigQuery's validator or dry-run features and the intended project context to inspect syntax, referenced resources, permissions, and bytes processed.
GoogleSQL is not MySQL with cloud tables
BigQuery's GoogleSQL dialect combines familiar relational clauses with nested and repeated data, cloud resource paths, analytic functions, scripting constructs, and warehouse-specific DDL and DML. A formatter must recognize the complete token before deciding where a comma, period, at sign, backtick, quote, or comment begins and ends.
Quoted identifiers use backticks. A fully qualified table can appear as `project-id.dataset.table`, where the project segment may contain a dash that would be an operator outside the quoted path. The formatter must preserve the backticks and path text. Changing those characters is not beautification; it can select another resource or produce invalid GoogleSQL.
GoogleSQL also supports raw, bytes, quoted, and triple-quoted literal forms. Literal chunks follow documented rules and may contain whitespace or punctuation that resembles SQL structure. The format engine should treat recognized literals as units and never alter their content. A diff remains necessary for newer features and templated code.
@name can supply expression values, not identifiers.ARRAY, STRUCT, and repeated fields need visible nesting.QUALIFY filters rows after window evaluation.Make hierarchy visible
Array literals, subqueries, offsets, safe offsets, and array functions can nest deeply. Indentation reveals which bracket or subquery belongs to each expression.
Typed and inferred structs group fields inside one value. Formatting should retain field order, aliases, types, and every nested expression.
UNNEST turns an array into rows and often appears with correlated joins. Layout can clarify the relationship but cannot prove that cardinality or null handling is intended.
Table wildcards and _TABLE_SUFFIX filters can affect scan scope. A formatter preserves them; BigQuery must determine which tables and bytes are touched.
Window-heavy queries benefit from structure
Analytic workloads often layer common table expressions before a final aggregation or window calculation. Formatting can give each CTE a stable visual boundary and indent its select list, filters, joins, and grouping. It does not evaluate whether a CTE scans an avoidable partition range or whether a repeated transformation should be materialized.
QUALIFY filters the result of window functions and follows a different role than WHERE or HAVING. A BigQuery profile knows the keyword belongs to GoogleSQL query structure, while a generic formatter may treat it as an identifier. Window definitions should keep partitions, ordering, and frames visibly associated with the function they control.
BigQuery scripting adds declarations, variables, control flow, temporary functions, and multiple statements. The page can separate recognized statements, but it is not a full script debugger. Template layers such as dbt or Jinja should be formatted by tooling that understands the template, or after rendering representative compiled GoogleSQL.
LiveParse has no project, table metadata, partitions, cluster columns, dry-run response, billing account, reservation, cache state, or query plan. Formatting cannot estimate bytes processed or cost.
Review Google's cost guidance →No BigQuery API call
Formatting happens in a disposable worker created by the page. It does not use the BigQuery REST API, Storage API, console, JDBC, ODBC, or a third-party query service.
The page never asks for a Google Cloud account, service account, project, token, dataset, location, or billing configuration.
Input stops at 50,000 characters, a warning appears at 25,000, the worker is terminated after 2 seconds, and output above 200,000 characters is discarded.
The formatted result enters the clipboard or a local .sql file only when you choose those actions. Clipboard managers and device software are separate boundaries.
Formatting is presentation
Questions answered
No. Formatting runs inside the current browser tab and makes no BigQuery API request. The page has no project identity, credentials, dataset access, execution job, or billing context.
The BigQuery profile recognizes common GoogleSQL vocabulary including arrays, structs, UNNEST, window functions, and QUALIFY. New features and complex scripts can exceed a formatter's grammar, so inspect the diff and validate with BigQuery.
No. The formatter has no table metadata, partitions, wildcard expansion, dry-run result, billing project, reservation, cache status, or execution plan. Use a BigQuery dry run and organizational cost controls.
No. Verify syntax, datasets, tables, routines, types, locations, permissions, bytes processed, and results with the intended BigQuery project and supported tooling.
Both dialects use backticks, but BigQuery adds cloud resource paths, nested data, UNNEST, GoogleSQL literal forms, QUALIFY, and other vocabulary that is not MySQL. Select the actual execution engine.
Template delimiters are a separate language layer. Format with template-aware tooling or format representative compiled GoogleSQL. Do not assume a query formatter understands macros, control flow, or compile-time substitutions.
Pathological inputs can use large amounts of memory. The page caps text at 50,000 characters and stops formatting after 2 seconds. Split a script only at safe statement boundaries and preserve dependency and transaction order.