Snowflake SQL Formatter

Format Snowflake SQL with database.schema.table names and Snowflake functions. Pick the Snowflake dialect and beautify queries online.

Part of the free SQL Formatter. Runs in your browser — nothing is uploaded.

Snowflake SQL Formatter

Snowflake queries typically use fully qualified names like analytics.public.payments and date functions such as DATEADD. Select the Snowflake dialect to get tidy, review-ready SQL for your warehouse reports.

Worked example: Fully qualified table and DATEADD in Snowflake

Input

select customer_id, sum(amount) as revenue, count(*) as txns from analytics.public.payments where status = 'settled' and paid_at >= dateadd(day, -30, current_date) group by customer_id order by revenue desc limit 50;

Formatted Snowflake SQL

SELECT
  customer_id,
  sum(amount) AS revenue,
  count(*) AS txns
FROM
  analytics.public.payments
WHERE
  status = 'settled'
  AND paid_at >= dateadd(day, -30, current_date)
GROUP BY
  customer_id
ORDER BY
  revenue desc
LIMIT
  50;

Practical tip

Use fully qualified names in shared queries so they run regardless of the session's current database and schema.

How to use this SQL Formatter

  1. 1Use the live tool above — it runs entirely in your browser and never uploads your data.
  2. 2Paste the sample from the worked example, or use your own input.
  3. 3Copy the result, then adapt the same steps in your editor, script, or pipeline.

Snowflake SQL Formatter FAQs

Does it handle Snowflake-specific functions?

Common Snowflake functions such as DATEADD and CURRENT_DATE are recognized with the Snowflake dialect selected.

Can I format dbt models?

Format the compiled SQL. Jinja blocks like {{ ref() }} are not SQL and can confuse the formatter, so compile the model first.

More SQL Formatter pages

Open the full SQL Formatter tool →