SQL Formatter
Format SQL queries with keyword casing and smart indentation.
Runs locally · Nothing uploaded
SQL input
Formatted SQL
Result will appear here…Advertisement
About SQL Formatter
Formats SQL into a readable layout — clauses on their own lines, uppercased keywords, and indentation that follows the query's structure, including joins, subqueries, and CTEs. Choose your dialect (standard SQL, PostgreSQL, MySQL, or SQLite) so dialect-specific syntax formats correctly.
Related tools
SQL & DatabaseRuns locally in your browser.SQL MinifierCollapse a formatted SQL query onto a single compact line.SQL & DatabaseRuns locally in your browser.JSON to SQL INSERTGenerate SQL INSERT statements from a JSON array of objects.SQL & DatabaseRuns locally in your browser.DB Connection String ParserBreak a database URI into host, port, user, database, and options.