ToolBuddy
In Browser

SQL Formatter

Beautify SQL in the browser with dialect-aware formatting for PostgreSQL, MySQL, SQLite, and T-SQL. Paste a query, pick indent, and copy readable SQL without sending statements to a formatter service.

Runs in your browser. Nothing is uploaded.

Loading tool…

About this tool

Beautify SQL in the browser with sql-formatter. Pick a dialect (generic SQL, PostgreSQL, MySQL, SQLite, T-SQL) and 2- or 4-space indent. Keywords are uppercased so a pasted one-liner becomes a readable query.

How to use: paste a SELECT, INSERT, or DDL snippet, pick dialect and indent, copy. Handy for reviewing a query from logs or a ORM dump before you commit it. Invalid SQL may still indent; this is a formatter, not an engine.

Example: select a,b from t where a=1 becomes a wrapped SELECT with FROM and WHERE on their own lines. Keep production credentials out of the query text if you can.

Statements never go to a SQL pretty-print host. After load, formatting works offline. Related: JSON to SQL if you needed INSERT statements from fixtures, JSON formatter for JSON inside a query string.

Related Web tools