Paste messy SQL and get clean, indented, readable output instantly — free, no signup, runs entirely in your browser.
Paste any SQL query — SELECT, INSERT, UPDATE, DELETE, CREATE, or complex queries with JOINs, CTEs, and subqueries.
The formatter adds proper indentation, line breaks, and uppercases SQL keywords. Choose to keep keywords uppercase or lowercase.
Click Copy Output to copy the clean, readable SQL to your clipboard. Use Minify to compact SQL for production use.
This formatter handles standard SQL including SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, ALTER TABLE, and most JOIN types. It works with MySQL, PostgreSQL, SQLite, SQL Server, and Oracle syntax. Dialect-specific functions and stored procedures may not format perfectly but the core query structure always formats correctly.
No. The SQL formatter runs 100% in your browser using JavaScript. Your SQL query never leaves your device. This makes it safe to use with sensitive queries, internal database schemas, and proprietary data.
Format adds indentation, line breaks, and keyword casing for human readability — ideal for code reviews, documentation, and debugging. Minify removes all whitespace to produce a compact single-line query — useful for embedding SQL in config files or logging.