SQL Formatter

Format SQL queries with clean indentation and capitalization. Free online SQL formatter.
SQL input
SQL formatting options

Need smaller output? Open SQL Minifier.

Tool Introduction

Format SQL queries for code review, incident debugging, documentation, BI notebooks, and database console work. The formatter runs locally in your browser and does not upload your query.

Choose indentation, keyword case, comma style, clause breaks, condition breaks, and semicolon handling so the result matches the style commonly used by engineering and analytics teams.