SQL Formatter
Format SQL queries for readability
100% In-BrowserNo Server UploadFree, No Signup
FormattersHow to Use
- Enter SQL
Paste or type your SQL query into the input area.
- Format
Click "Convert" or let real-time formatting do the work. Toggle keyword uppercasing and indent size in the toolbar.
- Copy result
Use the "Copy" button to copy the formatted SQL to your clipboard.
SQL Formatter Examples
SELECT statement
Input
select id, name, email from users where active = true and age > 18 order by nameOutput
SELECT id, name, email
FROM users
WHERE active = true
AND age > 18
ORDER BY nameKeywords are uppercased and major clauses start on new lines.
JOIN statement
Input
select u.name, o.total from users u inner join orders o on u.id = o.user_id where o.total > 500Output
SELECT u.name, o.total
FROM users u
INNER JOIN orders o
ON u.id = o.user_id
WHERE o.total > 500Features
- Auto-uppercase SQL keywords (SELECT, FROM, WHERE, etc.)
- Newlines before major clauses (SELECT/FROM/WHERE/JOIN/ORDER BY)
- Subquery indentation support
- Configurable indent size (2 or 4 spaces)
- Toggle keyword uppercasing ON/OFF
- Real-time preview support
- Local processing for privacy
FAQ
Which SQL dialects are supported?
Standard ANSI SQL keywords are supported. Basic queries for MySQL, PostgreSQL, SQLite, and other major databases can be formatted.
Can it format stored procedures?
Basic SQL keyword formatting is supported, but database-specific procedural syntax has limited support.
Is my data sent to a server?
No. All processing happens locally in your browser and nothing is uploaded.