SQL Formatter

Format and beautify your SQL queries with proper indentation and syntax highlighting.

Tools run in your browser. Shared links may include your input; check the URL before sharing.

How to use

  1. Paste SQL and select the database dialect.
  2. Format and inspect clauses and indentation.

This example illustrates one supported operation. Choose the matching mode and settings above; generated values and formatting may vary.

Example input or settings

select id,name from users where active=1

Example result

SELECT
  id,
  name
FROM
  users
WHERE
  active = 1

Does it execute SQL?

No. It changes layout. Validate query behavior in the target database.