SQL Formatter
SQL Input1 lines
Formatted Output

How to Use

1. Enter SQL Query
Paste the SQL query you want to format in the left input area. Single-line queries from logs work great!

2. Configure Options
Set indent size (2, 4, or 8 spaces) and toggle keyword uppercase conversion as needed.

3. Click Format
Click 'Format' to display the beautifully formatted SQL on the right.

4. Copy Result
Use 'Copy' to copy to clipboard, or click ↕ to send the result back to the input for further editing.

Frequently Asked Questions

What SQL dialects does the formatter support?

It supports standard SQL syntax used in MySQL, PostgreSQL, Oracle, SQL Server, SQLite, and more. It can format SELECT, INSERT, UPDATE, DELETE queries with JOINs and subqueries.

Can I format a single-line SQL from logs?

Yes, paste the single-line SQL query and click 'Format'. Keywords will be separated with line breaks and indentation for easy reading.

Is my SQL sent to any server?

No. All processing happens in your browser. Your SQL is never transmitted to any server.

What does uppercase keywords mean?

It automatically converts SQL keywords (SELECT, FROM, WHERE, etc.) to uppercase. This is a common convention to improve SQL readability.