SQL Formatter

Format and minify SQL queries for several dialects.

SQL input

Output

About the SQL Formatter

Generated or hand-edited SQL often arrives as one long line. Formatting puts each clause on its own line and indents subqueries and joins so the shape of the query becomes readable.

This tool only rewrites text. It never connects to a database, never executes a statement and never sees your data.

Frequently asked questions

Related tools

JSON Formatter

Formatters

Format, beautify and validate JSON with clear error messages.

Open Tool

JSON Validator

Formatters

Check whether a JSON document is valid and locate syntax errors.

Open Tool

JSON to YAML

Converters

Convert JSON documents into readable YAML.

Open Tool

YAML to JSON

Converters

Parse YAML and convert it into formatted JSON.

Open Tool