Format SQL queries with keyword line breaks, indentation, dialect settings, and keyword case control.
SQL Formatter is a free online tool that brings SQL queries into a readable form with keyword line breaks, indentation, and optional keyword case normalization. It is useful for queries from logs, ORM output, admin panels, BI tools, migrations, and SQL clients. The tool runs in your browser and does not send data to the server.
Choose a related tool for the next step.
Data passed between tools is kept only in the current browser session.
SQL Formatter brings SQL queries to a readable form by adding line breaks before SELECT, FROM, WHERE, JOIN, GROUP BY, ORDER BY, LIMIT, and other keywords, adding indentation, and normalizing keyword case. The tool is useful for queries from logs, ORM output, admin panels, BI tools, migrations, and SQL clients including PostgreSQL, MySQL, SQLite, MSSQL, and generic SQL.
The service formats the query text but does not execute SQL, does not connect to a database, and does not validate syntax for a specific SQL dialect. Dangerous commands such as DROP, DELETE, or UPDATE without WHERE can trigger a warning.
All processing is done locally in the browser. Your data is not sent to the server.