SQL Formatter
Format and beautify SQL queries
Use the interactive tool with JavaScript enabled.
Format and beautify SQL queries
Use the interactive tool with JavaScript enabled.
Paste a SQL query to format it with consistent indentation, keyword casing, and logical line breaks. Handles SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, and complex queries with subqueries, JOINs, and WHERE clauses. Useful for making auto-generated ORM queries readable, preparing SQL for documentation, reviewing query plans, and cleaning up minified SQL from logs.
Tool processing runs in your browser. Privacy policy and cookie preferences.