SQL Formatter
Paste a one-line query and get indented SQL back. It is meant for reading and editing statements, not for connecting to a database.
How to use it
- Paste a SQL statement.
- Run Format to indent clauses.
- Copy the formatted query into your editor.
Useful for
- Read a minified query
- Line up JOIN and WHERE clauses
- Clean SQL before a code review
Related tools
JSON Formatter & Validator
Beautify, minify, validate, and explore JSON with instant error highlighting — 100% in your browser.
HTML Formatter
Beautify messy HTML with consistent indentation, or minify it to one line.
JSON Converter
Convert JSON to Laravel arrays, TypeScript interfaces, PHP DTOs, and CSV — privately on-device.
Questions about SQL Formatter
Which SQL dialects work? +
The formatter is dialect-agnostic and works well with MySQL, PostgreSQL, SQLite, and most ANSI SQL.
Is my query sent anywhere? +
Never. Formatting happens locally in the browser.