SQL Query Examples
Copy-ready SQL examples for common tasks, with formatting.
Turn one-line or messy SQL into readable, consistently indented queries.
Runs in your browser. Your input is never uploaded.
Paste a SQL query or press Sample.
Select dialect, keyword case and indent width.
Press Format or Minify, then copy or download.
Input
select id,name from users where active=1 order by nameOutput
SELECT
id,
name
FROM
users
WHERE
active = 1
ORDER BY
nameCopy-ready SQL examples for common tasks, with formatting.
Format, beautify and minify JSON with custom indentation.
Beautify or minify-whitespace JavaScript code.
No. It only reformats text. No database connection is made.
Unbalanced quotes or parentheses and unsupported syntax can confuse the parser. Try another dialect.
Minify strips comments and collapses whitespace outside string literals. Review queries that depend on comment hints.
INNER, LEFT, RIGHT, FULL and CROSS joins explained with a small example dataset, result tables and common pitfalls.
Paste or type input above, or press Sample to see an example.