SQLinForm

Free Online SQL Formatter & Analyzer

SQLinForm – puts your SQL in form, and informs you about it.

Format, understand and document your SQL – right in your browser. No registration, nothing to install.

200+ formatting options

Indentation, alignment, keyword case, line breaks, comments – change any option on the left and format again. For 28 SQL dialects, from Oracle and SQL Server to Snowflake and BigQuery.

Data Flow Explorer NEW

Understand SQL you did not write: query blocks, tables, joins and the path of the data through CTEs, sub-queries and UNIONs as a diagram. Click a box to highlight its lines.

Navigator and Usage Inspector

Tame monster SQL: the Navigator shows its structure as a graph and a searchable tree. The Usage Inspector finds every occurrence of a term in your SQL – ideal for finding a variable that is declared but never used.

Your SQL stays private

Everything runs locally in your browser with WebAssembly. Your SQL never leaves your computer – no registration, no data collection.

▼

General Options

?
▼

Upper/Lower Keywords

?
Lower/Upper Case Options
My Lower/Upper Case Keywords
▼

Alignment

?
Comma Alignment
Alias Alignment
Equal Sign & Operators
▼

Output Format

?
NO-FORMATTING Sections
Line Length
▼

Comments

?
Line Comments
Block Comments
Delete Comments
▼

White Spaces

?
White Spaces Options
Shift Complete SQL Statement by Spaces
▼

SQL

?
Small SQL Linebreaks (Pro)
Align Master Keywords (Pro)
Linebreak Delimiter (Pro)
▼

SELECT

?
▼

FROM

▼

INTO

▼

WHERE

WHERE
WHERE Condition
▼

HAVING

HAVING
HAVING Condition
▼

GROUP BY

▼

ORDER BY

▼

Sub-Select & CTE

?
Align & Indent Sub-SELECT Statement
Sub-SELECT Brackets
▼

JOIN

?
JOIN Statement
ON Condition
JOIN Condition
▼

INSERT

?
INSERT Brackets
Columns and Values
Commas
▼

UPDATE, DELETE

UPDATE
DELETE
▼

MERGE

?
MERGE
USING
ON
ON Condition
WHEN Condition
THEN
▼

Comma Separated Lists in SQL Statemets

?
Linebreak After Comma
Linebreak Before Comma
Concat Operator ('||')
▼

My List for SQL Functions 1

?
▶

My List for SQL Functions 2

▶

My List for SQL Functions 3

▼

Conditions in Brackets

?
▼

Analytic Expressions - OVER

?
Brackets
PARTITION BY / ORDER BY
Stack & Indenting
▼

CASE Keywords

?
CASE / END
WHEN
THEN
ELSE
▼

CASE Conditions

Brackets
AND/OR
▼

Small CASE Statements

▼

ANSI DDL

?
Linebreak Before Comma
Linebreak After Comma
Brackets
Indenting
My CREATE Keywords
▼

IF THEN ELSE

?
IF
THEN
ELSE
▼

Extract SQL from Code

?
▼

Generate SQL Code

Pre-Defined Programming Language
My Output Format - Settings
▼

Invisible

NEW
Loading WASM... Formats: 0

Frequently Asked Questions

Is the online SQL formatter free?

Yes. All 200+ formatting options, the Data Flow Explorer, the Navigator and the Usage Inspector are free, without registration.

Is my SQL secure? Do you store my data?

Your SQL never leaves your computer. Everything runs in your browser with WebAssembly; nothing is sent to a server and nothing is stored.

How do I format SQL online?

Paste your SQL into Input SQL, choose Your Database and click Format & Analyze SQL. Change any option on the left and format again.

Which databases are supported?

28 SQL dialects, including Oracle, SQL Server, MySQL, PostgreSQL, DB2, SQLite, Snowflake, BigQuery, Redshift and Teradata. Choose yours in Your Database, so that its specific syntax is formatted correctly.

What formatting options are available?

More than 200: indentation, keyword case, alignment, line breaks and comments, plus dedicated options for SELECT, JOIN, WHERE, sub-queries and CTEs, INSERT, UPDATE, MERGE, CASE and stored procedures.

What is the Data Flow Explorer?

A diagram of an existing SQL statement: every query block with its tables, columns and filters, the joins, and how the data flows through CTEs, sub-queries and UNIONs. Format your SQL and click Data Flow; a click on a box highlights its lines.

What is the Navigator?

The structure of your SQL as an overview graph of all statements, sub-queries and CTEs, and as a searchable tree. Click a row to highlight its line.

What is the Usage Inspector?

It finds every occurrence of a term in your SQL and shows how often it occurs and in which lines – for example to find a variable that is declared but never used.

Can I export the diagrams?

Yes. Print / PDF opens the diagram in a new tab for printing or saving as PDF, SVG downloads it as a file.

Can I use SQLinForm in my editor?

Yes: in VS Code, the JetBrains IDEs, SSMS, Visual Studio, Notepad++, DBeaver and Antigravity, and as a desktop app for Windows – with the same formatting engine as this online formatter.

What is the difference between Free and Pro?

Online, all options are free. In the plugins, Pro unlocks all 200+ options for editing; Data Flow Explorer, Navigator, Usage Inspector and profiles are free in every version. Compare Free and Pro