Tools

SQL Formatter & Minifier

Format SQL with indentation or minify to one line. Uppercase keywords option included.

Data is never sent to the server. Everything runs locally in your browser. Safe for sensitive information.

About this tool

Format long single-line SQL queries into readable, indented SQL. Also minify formatted SQL into a single line. Option to uppercase SQL keywords (SELECT, FROM, WHERE, etc.).

Reading a long single-line SQL from logs or chat is painful. Paste your SQL here to instantly format it with proper indentation and line breaks. You can also minify formatted SQL for embedding in scripts. The uppercase keywords option ensures consistency with your team's coding standards.

Tool interface

  

Usage

  1. Paste SQL into the input area
  2. Click Format or Minify
  3. Copy the result

When to use

Making long SQL readable, code review prep, embedding SQL in scripts.

Examples

SELECT a,b FROM t WHERE x=1 → formatted with line breaks and indentation.

FAQ

What SQL dialects are supported?

Standard SQL compatible with MySQL, PostgreSQL, SQLite, SQL Server, and more.

Should SQL keywords be uppercase?

Not required, but many teams prefer it for readability. Toggle the option to auto-uppercase.

Related tools