Pasted or generated SQL is often written as a single unbroken line, or with inconsistent indentation across joins, subqueries and conditions. This makes it slow to review before running against a database. Formatting re-indents keywords, clauses and nested queries so the structure of the statement is easy to scan.
Pick a dialect to match the database you're targeting: dialects differ in supported syntax (e.g. LIMIT vs TOP, backtick vs double-quote identifiers), which affects how the formatter parses and re-indents certain statements.
Formatting happens entirely in your browser using the open-source sql-formatter library: nothing is sent to a server.
SQL dialects differ in syntax details (for example MySQL uses backticks for identifiers while PostgreSQL uses double quotes, and LIMIT/TOP clauses vary), so picking the right dialect helps the formatter parse dialect-specific syntax correctly.
No. It reformats whitespace and indentation around the tokens it recognizes, but it does not check that the query is semantically valid or would run against a real database.
No. Formatting runs entirely in your browser using the open-source sql-formatter library.