TOOLTIKI Lovable tool, really free
Developer Formatting

SQL formatter

What to do

Processed in your browser · nothing is uploaded

Local · literals protected before keyword matching
Advertisement
320 × 100

Breaks a query onto its keyword boundaries and indents the AND and OR continuations, so a long WHERE clause becomes readable.

How to use the sql formatter

1 Paste your input. The result appears immediately.
2 Pick the operation you want.
3 Copy the result, or save it as a file.

This formats structurally rather than by parsing the query, which is a deliberate limit worth stating: it does not know your dialect, will not indent a subquery to a deeper level, and validates nothing. What it does get right is the trap that catches naive formatters — a keyword inside a string literal. `WHERE note = 'sent from accounts'` contains the word FROM, and a formatter that breaks on it produces a query that no longer parses. Literals are set aside here before any keyword matching happens.

Questions

No. It reformats whatever you give it and never checks the query is correct.

PostgreSQL — SQL syntax
Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING