SQL Formatter Options

Keyword Indention & Alignment

How the master keywords – SELECT, FROM, WHERE, GROUP BY, ORDER BY, INSERT, UPDATE, DELETE – relate to the column lists beneath them. This is the single biggest lever on the overall silhouette of a formatted statement: left-aligned block style, or right-justified so that every keyword ends at the same column.

Keyword Indention

The width is measured per statement, so it adapts to the keywords that statement actually contains. A query without a multi-word join yields the same result under SMALL and BIG.

IDOptionWhat it doesDefault
ID005ProSelect the indention for SELECT, UPDATE, DELETE, INSERT Ma...
GEN_SQL_AUTO_IND
Derives the indentation width from the keywords themselves instead of from the fixed ID002 value, so that every clause body starts in one common column. SMALL measures the longest single keyword token, BIG the longest complete keyword expression: in a query containing LEFT OUTER JOIN, SMALL counts only LEFT (4 characters) while BIG counts the whole LEFT OUTER JOIN (15). One space is added to the measured width. NONE ignores the keywords and uses the ID002 spaces per level.
Choices: NONE Use General Number of Spaces for Indention · SMALL Use Small Keyword Size · BIG Use Large Keyword Size
NONE

The same query under both settings, with ID146 "Linebreak After JOIN" switched off so the measured widths stay visible on one line. SMALL measures the longest single token (select, 6) and indents to column 8; BIG measures the longest expression (left outer join, 15) and indents to column 17. Where a keyword expression is longer than the measured width, as left outer join is under SMALL, its operand simply follows one space later.

ID005 = SMALL
select dept_nbr,
       dept_name
from   dept
left outer join employee
on     dept.dept_nbr = employee.dept_nbr
where  dept_zip = '64521'
ID005 = BIG
select          dept_nbr,
                dept_name
from            dept
left outer join employee
on              dept.dept_nbr = employee.dept_nbr
where           dept_zip = '64521'

Tip: Because BIG scales with the longest keyword expression, a single LEFT OUTER JOIN pushes the whole statement 9 columns further right than SMALL would. On narrow review widths that is worth checking against ID022.

Keyword Alignment

Align Master Keywords
IDOptionWhat it doesDefault
ID034ProRight-Justify Keywords
ALI_RIGHTKEYWORD
Right-justifies the master keywords so that they all end at the same column and the column lists begin at a common left edge – the classic river layout.off

Right-justifying the master keywords gives the statement a single left edge for all clause bodies – the classic "river" layout.

ID034 off
select dept_nbr,
       dept_name
from   dept
where  dept_zip = '64521'
group by dept_nbr
ID034 on
  select dept_nbr,
         dept_name
    from dept
   where dept_zip = '64521'
group by dept_nbr

Option IDs are identical across all SQLinForm editions (VS Code, JetBrains, SSMS, Notepad++, Online Formatter) and are the keys stored inside a profile file. Generated from properties.json 2026.8.21.0.