How to format and beautify SQL online

Paste one-line SQL — get readable, indented output with keywords on their own lines.

SQL copied from logs, ORMs, or chat is often one long line. The SQL Formatter adds line breaks before major keywords and indents for readability.

Try it — paste SQL and see formatted output

How it works

  1. Paste SQL — SELECT, INSERT, UPDATE, or any DDL.
  2. Read formatted output — updates on every keystroke.
  3. Copy — one click to clipboard.

What it does not do

This is a formatter, not a validator. It does not check syntax against PostgreSQL, MySQL, or SQL Server dialects. Use it for readability before code review or documentation.

Privacy

Queries stay in your browser. Nothing is sent to a server — safe for production schemas and sensitive table names.