SQL Formatter

Notepad++ plugin

6 SQL dialects

ANSI as a neutral base, plus six concrete dialects — Snowflake, MS SQL (T-SQL), PostgreSQL, MySQL/MariaDB, SQLite and Databricks (Spark SQL). The formatter knows, per dialect, which function name, quote character and date/time syntax is idiomatic, and converts through a central hub so any dialect can reach any other.

Function names that differ per database

NULL replacement is called NVL in Snowflake, ISNULL in T-SQL, and IFNULL in MySQL and Databricks. String length is LENGTH in most dialects, but LEN in T-SQL. The formatter recognizes these function families and rewrites them to the target dialect's equivalent — not a one-to-one text substitution, but a lookup table per dialect pair.

Before

SELECT NVL(discount, 0) AS discount, LENGTH(customer_name) AS name_len
FROM orders

After

SELECT IFNULL(discount, 0) AS discount, LEN(customer_name) AS name_len
FROM orders

One click: idiomatic casing per dialect

On the Dialect tab you pick a dialect and click "Apply dialect defaults" — the formatter immediately applies the casing convention that fits that dialect (for example predominantly uppercase in Snowflake scripts, lowercase in PostgreSQL style). You can then fine-tune the result further on the other tabs.

Dialect-tabblad van de SQL Formatter instellingen

MS SQL to Snowflake, including date functions

Idiomatic constructs like IIF() and GETDATE() also get their Snowflake counterpart, together with the casing preset that belongs to that dialect.

Before

select iif(amount > 1000, 'large', 'small'), isnull(notes, '-'), getdate()
from orders

After

SELECT IFF(AMOUNT > 1000, 'LARGE', 'SMALL'), NVL(NOTES, '-'), CURRENT_TIMESTAMP
FROM ORDERS

Frequently asked questions

Why isn't ANSI a 'seventh dialect' in the list?

ANSI is the neutral hub form the formatter uses internally to convert from any dialect to any other, and it can itself also be selected as a dialect setting without vendor-specific function names.

What happens to functions with no equivalent?

Functions the formatter doesn't recognize as part of a known dialect family are left exactly as they are — it never guesses.