How to format SQL in any editor

Some editors format SQL out of the box, some need one extension, and one of the most widely used cannot do it at all without a plugin. Each guide below covers the exact shortcut, where the settings live, and what that editor still cannot do — with a formatter on the page for the cases it cannot reach.

Which editors format SQL natively?

Editor Formats SQL? Shortcut Guide
SQL Server Management Studio Built in Ctrl+K, Ctrl+Q How to format SQL in SSMS
Visual Studio Code Needs an extension Shift+Alt+F How to format SQL in VS Code
Notepad++ Needs a plugin Ctrl+K How to format SQL in Notepad++
DBeaver Built in Ctrl+Shift+F How to format SQL in DBeaver
IntelliJ IDEA and DataGrip Built in Ctrl+Alt+L How to format SQL in IntelliJ
Oracle SQL Developer Built in Ctrl+F7 How to format SQL in SQL Developer

Shortcuts are the Windows and Linux bindings; each guide lists the macOS equivalent where the editor runs there. All facts re-checked against primary documentation on 20 August 2026.

Formatting a specific database?

Every guide embeds the same formatter, preset to a dialect that suits that editor's usual audience. If you want it preset to yours, start from one of these instead.