SQL Formatter

Format SQL queries for better readability. Adjust indentation and keyword case to improve code readability.

Sponsored
Loading...

Formatting Settings

Input SQL

Formatted SQL

About SQL Formatting

Supported Features:

  • Line breaks and indentation for major SQL clauses (SELECT, FROM, WHERE, JOIN, etc.)
  • Alignment of comma-separated fields in SELECT clause
  • Proper indentation for JOINs
  • Keyword case conversion (uppercase/lowercase)
  • Protection of comments and string literals

Notes:

  • Complex subqueries or CTEs (Common Table Expressions) may not be fully supported
  • Vendor-specific syntax is processed as standard SQL
  • SQL syntax within strings is not formatted

Recommendation: Please verify that the query works correctly after formatting. Especially for complex queries, carefully check that there are no changes in logic before and after formatting.

How to Use

  1. Enter the SQL query you want to format in the input field.
  2. You can configure indent size and keyword case (uppercase/lowercase).
  3. Click the "Format" button to display the formatted SQL in the output field.
  4. Use the "Insert Sample" button to check with sample SQL.
Sponsored
Loading...
Sponsored
Loading...

About Favorites

Your favorites are saved locally in your browser and never sent to our servers for your privacy.