Quoted strings are protected during keyword rewriting
Single- and double-quoted string literals are temporarily replaced with placeholders so SQL words inside them are less likely to be treated as clauses.
FREE WEB TOOL
Format one-line SQL into a more readable layout.
🔒 Images and text are processed in this browser and are not uploaded.
Apply lightweight SQL formatting by normalizing whitespace, putting major clauses on new lines and placing comma-separated items on separate lines.
SELECT id, name FROM users WHERE active = 1 ORDER BY name; is split so SELECT, FROM, WHERE and ORDER BY begin on separate lines, with selected columns separated after commas.This is a simple text formatter. Comments, vendor-specific syntax and complex procedural SQL are not parsed semantically, so always review the result before using it in production.
Single- and double-quoted string literals are temporarily replaced with placeholders so SQL words inside them are less likely to be treated as clauses.
Runs of whitespace are collapsed, then recognized major keywords are moved to fresh lines. Existing manual indentation is not preserved.
The formatter does not distinguish SELECT lists from function arguments using a full parse tree, so comma-heavy expressions can be reformatted more aggressively than a dedicated SQL formatter.
No database engine or SQL parser is called. A query with a syntax error can still be neatly formatted.
Related references: HTTP status codes · MIME types · Regex cheat sheet