SQL Formatter & Beautifier
Local ProcessingFormat, capitalize keywords, and indent SQL queries with clean readability.
How It Works & Processing Standards
Format, capitalize keywords, and indent SQL queries with clean readability.
Tool processing runs in your browser. If you create a calculator or conversion share link, its values are included in the URL. See the privacy policy for account, analytics and advertising data.
Current Limits
- Desktop max file size: 50MB
- Mobile max file size: 20MB
Makes long one-line queries or SQL from logs easy to read. Quoted strings and numbers stay as they are; only the layout changes.
What You Can Do
- A line per clause
- SELECT, FROM, WHERE, GROUP BY, ORDER BY and more start new lines.
- Upper-case keywords
- select becomes SELECT.
How to Use SQL Formatter & Beautifier
- 1Paste SQLPaste the query.
- 2CopyCopy the formatted SQL.
Examples
One-line query
Input: select id, name from users where age > 20 order by name
Result: SELECT id,
name
FROM users
WHERE age > 20
ORDER BY name
Common Use Cases
- Reading long queries from logs
- Tidying queries before code review
Frequently Asked Questions (FAQ)
Does it find SQL errors?
No, it only formats. Run the query against your database to check it.
