Blog
Wild & Free Tools

Snowflake SQL Formatter Online — Beautify Snowflake Queries in Your Browser

Last updated: April 2026 8 min read

Table of Contents

  1. Why Snowflake worksheet formatting falls short
  2. Snowflake-specific syntax we handle
  3. Format a Snowflake query — step by step
  4. When you should still use the worksheet formatter
  5. Snowflake formatter vs other tools
  6. Related developer tools for data teams
  7. Frequently Asked Questions

Snowflake's worksheet editor formats SQL when you press Cmd+Shift+F, but the result is rough — long SELECT lists collapse, CTEs get squished onto two lines, and QUALIFY clauses lose their indent. If you copy a query out of Snowflake to share in a PR description or stick in a dbt model, it often looks worse than what you started with.

Our SQL formatter handles Snowflake syntax cleanly. Pick "Standard SQL" or "BigQuery" as the dialect (both handle Snowflake-style window functions and CTEs well), paste your query, and you get properly indented output you can drop into a Markdown comment, a Confluence page, or a dbt model. No upload, no Snowflake credentials, no account.

Why Snowflake Worksheet Formatting Falls Short for Real Queries

Snowflake's built-in formatter was designed for short ad-hoc queries. The moment your query has more than 5 columns, two CTEs, or a window function, the output starts looking strange:

Our formatter addresses each of these. Long SELECT lists get one column per line. CTEs are spaced for readability. Window functions get a clean OVER (PARTITION BY ... ORDER BY ...) layout that survives copy-paste into any editor.

Snowflake-Specific Syntax Our Formatter Handles Cleanly

Snowflake has a handful of features that other SQL formatters mangle. Here is what we handle correctly:

QUALIFY clauses — Snowflake's filter for window function results. Our formatter places QUALIFY at the same indentation as WHERE and HAVING, so the query reads top-to-bottom in the order Snowflake actually evaluates it.

Lateral joins with FLATTEN — when you call FLATTEN on a VARIANT column, the LATERAL keyword and the FLATTEN(input => ...) call get formatted as a proper join clause, not collapsed inline.

Copy commands — COPY INTO statements with FROM, FILE_FORMAT, ON_ERROR, PURGE, and CREDENTIALS each get their own line, and option blocks like FILE_FORMAT = (TYPE = CSV FIELD_DELIMITER = ',' SKIP_HEADER = 1) get expanded so each option is on its own line.

Stored procedure bodies — Snowflake stored procs can be JavaScript or SQL. The SQL ones with BEGIN/END blocks, IF/THEN/ELSE branches, and LOOP/WHILE constructs get proper indentation per nested block.

Time travel queries — FROM table AT (OFFSET => -3600) and FROM table BEFORE (STATEMENT => '...') stay readable instead of getting smushed.

How to Format a Snowflake Query in Your Browser

  1. Copy your query from the Snowflake worksheet — Cmd+A then Cmd+C. Or grab it from your query history panel.
  2. Paste it into the formatter — the input area accepts queries up to ~500KB. Long queries with hundreds of columns work fine.
  3. Set the dialect — pick "Standard SQL" for most cases, or "BigQuery" if your query uses STRUCT, ARRAY_AGG, or UNNEST patterns Snowflake shares with BigQuery.
  4. Pick indent style — 2 spaces is the dbt convention, 4 spaces matches most internal style guides, tabs work if your team uses them.
  5. Toggle uppercase keywords — most data teams uppercase keywords for readability. Leave the default on.
  6. Click Format — output appears with syntax highlighting. Click Copy to put it on your clipboard, or download as a .sql file.

For queries you reuse often, save the formatted version to a file and reference it from your team's docs or the dbt models repo.

Sell Custom Apparel — We Handle Printing & Free Shipping

When the Snowflake Worksheet Formatter Is Still the Right Choice

The native worksheet shortcut has one advantage: it is right there. You do not have to switch tabs. For these cases, stick with Cmd+Shift+F:

Use our tool when you are about to share the query with someone else, paste it into a dbt model, drop it in a PR description, or save it to a runbook. Anywhere the formatting matters more than the editing speed.

Snowflake Formatter Comparison — Browser Tool vs Paid Alternatives

ToolCostSnowflake SupportPrivacy
Hawk SQL Formatter (this tool)FreeStandard SQL + BigQuery dialects cover Snowflake syntax100% browser, query never leaves your device
Snowflake worksheet built-inIncludedNative — but rough on long queriesStays in Snowflake
SnowSQL command lineFreeNo formatter, only executionLocal
Datafold$$$ (enterprise)Yes, dbt-awareHosted SaaS
SQLFluff (CLI)Free, install requiredYes, with Snowflake dialect pluginLocal install
dbForge SQL CompletePaid (~$200+)SQL Server primary, Snowflake limitedLocal install

If you write Snowflake queries occasionally and want zero friction, the browser tool is the right pick. If you run formatting in CI as part of a dbt project, SQLFluff is worth the install. Most teams use both.

Other Browser Tools Snowflake Users Bookmark

If you spend your day in Snowflake worksheets, these other browser tools save the same kind of friction:

JSON formatter — Snowflake's VARIANT columns return JSON. When you SELECT a single VARIANT row and need to read it, paste it into the JSON formatter for a clean tree view.

CSV to JSON converter — when you pull a small Snowflake result as CSV and need to load it into a JavaScript app for testing, our CSV to JSON converter handles it without uploading anything.

Code diff checker — when comparing two versions of a Snowflake query (before vs after refactor, dev vs prod), the SQL query diff tool highlights every changed line.

Cron expression generator — Snowflake tasks use cron syntax. Our cron generator sister tool handles the schedule expression so you do not have to memorize the field order.

Try It Free — No Signup Required

Runs 100% in your browser. No data is collected, stored, or sent anywhere.

Open Free SQL Formatter

Frequently Asked Questions

Does this formatter understand Snowflake-specific keywords like QUALIFY?

Yes. The formatter handles QUALIFY at the same indentation as WHERE and HAVING. It also recognizes Snowflake-specific keywords like LATERAL FLATTEN, COPY INTO option blocks, time travel syntax (AT, BEFORE), and stored procedure BEGIN/END blocks.

Will the formatter execute my query against my Snowflake account?

No. This is a formatter only — it does not connect to Snowflake or any database. Your query is transformed locally in your browser and never leaves your device. Safe to use with production queries containing sensitive table names.

Can I format a query that uses dbt jinja templating?

Partially. Our formatter handles the SQL portions cleanly but does not interpret jinja blocks like {% for %} or {{ ref() }}. For dbt-aware formatting that understands jinja, install SQLFluff with the dbt-snowflake plugin and run it as part of your CI pipeline.

What is the maximum query size I can format?

About 500KB of SQL text, which is roughly 10,000 lines or several thousand columns. For queries larger than that, split them by CTE and format each section separately.

Does the formatter work offline?

Yes, after the page loads. The formatting library is cached in your browser, so once the tool page loads you can disconnect from the internet and continue formatting queries.

Launch Your Own Clothing Brand — No Inventory, No Risk