A one-line query
SELECT id, name FROM users WHERE active = 1 AND age > 18 ORDER BY name
Format SQL queries with clauses on their own lines, one column per line and indented subqueries.
Runs in your browser — nothing you enter is sent to a server.
Paste a query and it's reformatted as you type: each clause (SELECT, FROM, WHERE, JOIN, GROUP BY…) starts a new line, selected columns go one per line, AND and OR conditions line up, and subqueries are indented. Choose the keyword case and indent size.
The formatter works on tokens, so strings, quoted names and comments are never changed. It follows common SQL used by PostgreSQL, MySQL, SQLite and SQL Server; unusual dialect syntax is kept as written.
clause → new line · column → new line, indented · AND/OR → new line, indented
BETWEEN … AND … stays on one line.
SELECT id, name FROM users WHERE active = 1 AND age > 18 ORDER BY name
SELECT
COUNT(*)
FROM t
WHERE id IN (
SELECT
id
FROM s
)No — only whitespace and keyword case change. Strings and names are untouched.
SQL doesn't care; uppercase keywords are a common convention that makes them stand out from names. Pick whatever your team uses.
Yes — each statement ending in a semicolon is formatted separately, with a blank line between.
Format, validate and minify JSON, with the exact line and column of any error.
Developer Tools
Compare two texts and highlight what was added, removed or changed, line by line or word by word.
Text Tools
Change text to UPPERCASE, lowercase, Title Case or Sentence case, or to camelCase, snake_case and kebab-case for code.
Text Tools