SQLFormatter
FormatterConvertPricingDocsGet Pro
Formatter & beautifier · Snowflake

Format & beautify Snowflake SQL online

Format and beautify Snowflake SQL: consistent indentation, aligned clauses, uppercase keywords — and minified one-liners expanded back into readable code.

1Paste your Snowflake query into the editor.
2Press Format — or ⌘↵.
3Copy clean, highlighted SQL.
Open formatter
before
select o.id,o.data:customer.name::string as customer,o.data:total::number as total from orders o where o.data:status::string='paid' qualify row_number()over(partition by o.data:customer.id::string order by o.created_at desc)=1 limit 100;
Snowflake
SELECT
  o.id,
  o.data:customer.name::string AS customer,
  o.data:total::number AS total
FROM
  orders o
WHERE
  o.data:status::string = 'paid'
QUALIFY
  row_number() over (
    PARTITION BY
      o.data:customer.id::string
    ORDER BY
      o.created_at desc
  ) = 1
LIMIT
  100;

Why format Snowflake?

Snowflake extends SQL with semi-structured access (data:field.path), :: casts, the QUALIFY clause and FLATTEN over VARIANT columns. The formatter parses Snowflake grammar so colon-paths and QUALIFY survive formatting instead of breaking the parse.

Useful for the analytical queries you pull from Snowsight or dbt, where VARIANT navigation and window filters make one-line SQL nearly unreadable.

Beautify minified Snowflake SQL

Snowflake analytics lean on CTEs, VARIANT casts and aggregation — and Snowsight or an ORM often hands them back minified. Beautifying puts each CTE, JOIN and clause on its own indented line so the shape of the aggregation is legible again.

That readable layout is what makes a warehouse query reviewable: a clean multi-line Snowflake query produces a sane git diff, so your team can see what changed in a PR.

minified
WITH r AS(SELECT c.id,SUM(o.data:total::number)rev FROM customers c,orders o WHERE o.customer_id=c.id AND o.created_at>='2026-01-01' GROUP BY c.id)SELECT c.name,r.rev FROM customers c JOIN r ON r.id=c.id WHERE r.rev>10000 ORDER BY r.rev DESC;
Snowflake · beautified
WITH
  r AS (
    SELECT
      c.id,
      SUM(o.data:total::number) rev
    FROM
      customers c,
      orders o
    WHERE
      o.customer_id = c.id
      AND o.created_at >= '2026-01-01'
    GROUP BY
      c.id
  )
SELECT
  c.name,
  r.rev
FROM
  customers c
  JOIN r ON r.id = c.id
WHERE
  r.rev > 10000
ORDER BY
  r.rev DESC;

Frequently asked questions

Does the formatter understand Snowflake-specific syntax?

Yes. The query is parsed against Snowflake grammar rather than generic SQL, so Snowflake-only constructs survive formatting: VARIANT colon-paths, QUALIFY, :: casts, FLATTEN.

What is the difference between formatting and beautifying Snowflake 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 Snowflake formatter free?

Yes: free, no account, no usage limit. Only the optional AI features — explain, optimize and dialect conversion — require signing in.

All SQL formatters & beautifiers

Format PostgreSQLFormat MySQLFormat T-SQLFormat SQLiteFormat BigQueryFormat OracleFormat SnowflakeFormat Redshift