Loading…
Data & encoding
Format or minify SQL for PostgreSQL, MySQL, SQLite, SQL Server and Oracle, with clear syntax errors.
Runs in your browser — nothing you paste is uploaded
Loading the formatter…
No. Formatting runs in your browser with the open-source sql-formatter library, so queries with table names or data in them never leave your device.
Each database quotes names and writes some values differently: backticks in MySQL, [brackets] in SQL Server, $$ strings in PostgreSQL. Picking yours means those parse correctly instead of showing an error.
It puts the query on one line: comments are removed and whitespace is collapsed, while strings and quoted names are kept exactly. Optimiser hints (/*+ … */) and MySQL's /*! … */ code stay.