๐๏ธ
Database Query Formatter
Developer
Format SQL with indentation and optional uppercase keywords; check quote and parenthesis balance.
0
0
Input
Standard mode also covers MySQL NO_BACKSLASH_ESCAPES. PostgreSQL mode assumes standard_conforming_strings is on. Lexical SQL formatting preserves quoted text and comments. Checks quote and parenthesis balance; it does not validate database-specific SQL grammar.
Output
Make SQL easier to read with 2- or 4-space indentation and optional uppercase keywords. Lexical formatting preserves quoted text and comments and checks quote and parenthesis balance.
See moreSee less about the Database Query Formatter
It does not validate SQL grammar or database-specific semantics. The current output is plain text.
Key features
- Clean interface
- Fast processing
- No signup required
- Works offline
Related Blog Posts
Quick answers for Database Query Formatter
Which SQL keywords get their own line?
Major clauses like SELECT, FROM, WHERE, the JOIN variants, GROUP BY, ORDER BY, HAVING, LIMIT, and more each start a new line, with AND/OR conditions indented beneath them.
Does it validate SQL?
It checks quote and parenthesis balance while formatting tokens. It does not validate SQL grammar, execute queries or provide database-specific validation. Output is plain text.
What SQL dialect does the keyword list target?
A general ANSI-style vocabulary covering SELECT, INSERT, UPDATE, DELETE, and common clauses, not a database-specific dialect like PL/pgSQL or T-SQL extensions.