New
SQL Formatter
Runs in browserFormat SQL queries with readable indentation and line breaks. Paste SQL and get clean, consistent SQL. Runs entirely in your browser.
SQL Formatter tool
Keywords
Files never leave your browser.
Drag and drop a file here, or tap to select
Formatted SQL
SELECT
u.id,
u.name,
u.email,
o.total,
o.created_at
FROM
users u
LEFT JOIN orders o ON u.id = o.user_id
WHERE
u.active = true
AND o.total > 100
ORDER BY
o.created_at DESC
LIMIT
20How to use
Paste or upload SQL
Paste SQL or load a .sql file.
Review formatted output
The output updates as you type.
Copy or download
Copy the formatted SQL or download it with a .sql extension.
Examples
SELECT query
Multi-line formatting for readability.
InputSELECT id,name FROM users WHERE active=1 ORDER BY id;OutputSELECT id, name FROM users WHERE active = 1 ORDER BY id ;
Frequently asked questions
- Is my SQL sent to a server?
- No. Formatting runs locally in your browser.
- Which SQL dialects are supported?
- Common SQL dialects are supported; formatting may vary slightly by dialect.
Related tools
You might find these useful too.