Notepad++ plugin
SQL Formatter
Format SQL directly from Notepad++ with one keyboard shortcut — on a selection or the whole document, in any of the six supported dialects.
Goal
Writing SQL is fast, but keeping it tidy and consistent — especially in a team, or when you switch between Snowflake, PostgreSQL and T-SQL — takes time nobody has to spare. The SQL Formatter plugin adds a format button to Notepad++ that automatically indents, aligns and structures your SQL according to settings you control and can save as a profile.
The plugin is written entirely in C++ and runs as a single DLL inside Notepad++ — no Python or .NET runtime, no background process, no network traffic or telemetry. Everything happens locally, right in the editor, in milliseconds. Source fully open (MIT license) on GitHub.
Besides formatting, the plugin also converts between SQL dialects — including function names that differ per database (NVL vs. ISNULL vs. IFNULL) — and between quote, comma and casing styles. A script a Snowflake colleague sent you becomes readable, formatted T-SQL in two clicks.
What to expect
Selection-aware
Is text selected? Only that selection is formatted. No selection? The entire document is processed. This way you can clean up a single subquery without touching the rest of the file.
Read more →6 SQL dialects
ANSI, Snowflake, MS SQL, PostgreSQL, MySQL, SQLite and Databricks — including the function names, casing conventions and idioms that differ per dialect.
Read more →Format on Save & Format and Copy
Have every file format automatically on save, or format and put the result straight on the clipboard — handy for pasting into a Slack message or email.
Read more →Fully configurable with profiles
Casing, alignment, structure, spacing, joins and dialect rules can all be tuned individually, with saved profiles (export/import as JSON) to switch quickly between projects or teams.
Read more →dbt & Jinja-safe
{{ ref(...) }}, {{ var }} and {# comment #} are recognized and never split, re-cased or broken — your dbt models keep working.
Read more →Convert Quotes & number format
Switch with one click between single, double and backtick quotes, or between Dutch and English number notation (1.234,56 ↔ 1,234.56).
Read more →See it in action
One keystroke, from messy one-line SQL to consistently formatted output — with the default settings.
Before
SELECT o.order_id, c.name, SUM(ol.amount) total FROM orders o JOIN customers c ON c.customer_id = o.customer_id JOIN order_lines ol ON ol.order_id = o.order_id WHERE o.status = 'active' GROUP BY o.order_id, c.name
After
select o.order_id
, c.name
, sum(ol.amount) as total
from orders o
join customers c
on c.customer_id = o.customer_id
join order_lines ol
on ol.order_id = o.order_id
where o.status = 'active'
group by o.order_id
, c.nameUsage
1. Installation
Easiest: Plugins → Plugins Admin... → search Datamodder SQL Formatter → Install. Manual install also works:
Copy the plugin DLL and help.txt to the Notepad++ plugin folder (64-bit Notepad++ required). The two files must be in the same folder:
C:\Program Files\Notepad++\plugins\
FormatSQL\
FormatSQL.dll
help.txt2. Activate plugin
Restart Notepad++. The plugin appears automatically under Plugins → Datamodder SQL Formatter.
3. Format SQL
Open a SQL file or paste a query into a new tab. Press Ctrl+Alt+Shift+F or go via the menu:
Plugins → Datamodder SQL Formatter → Format SQL
Try it right in your browser
No installation needed: format a query with the real formatter engine (WebAssembly), right here on the site. Also a downloadable CLI for bulk-formatting scripts.
Every setting, with a before/after example
Nine tabs full of settings — dialect, casing, columns, alignment, structure, spacing, joins, FQDN and profiles — each with a real code example, so you never have to guess what a switch does.
Frequently asked questions
Is this plugin really free?
Yes, completely — MIT license, source open on GitHub, no ads, no 'pro' version behind a paywall.
Does the plugin send data over the internet?
No. Everything runs locally in a single C++ DLL inside Notepad++. No network traffic, no telemetry, no account required.
Does this work with dbt models (Jinja templating)?
Yes. {{ ref(...) }}, {{ var }} and {# comment #} are recognized separately and always stay intact, even inside a formatted query.
Which Notepad++ version do I need?
64-bit Notepad++ 8.3 or later. 32-bit is not supported.
Can I share settings with colleagues?
Yes — save your configuration as a profile and export it as a JSON file; a colleague imports it with one click.
Is the plugin still actively maintained?
Yes, regular new releases with bug fixes and features — see the commits and releases on GitHub.
Found a bug, or have an idea for an improvement?
Report it directly as an issue on GitHub — it gets read and followed up on. Prefer not to use GitHub? Send us a message through the contact form instead, and we'll pass it along.