SQL Formatter
Format SQL queries with readable indentation and line breaks, making SELECT, JOIN, WHERE, and INSERT statements easier to review.
How to Use
- Paste your SQL into the input area (even single-line queries generated by an ORM like Prisma or Hibernate)
- Choose the indent width: 2 spaces for pasting into Slack or Notion; 4 spaces for code review on GitHub or GitLab
- Click "Format SQL" β everything runs in your browser, no SQL is sent to an external server
- The result splits SELECT, FROM, JOIN, WHERE, GROUP BY, and ORDER BY onto separate lines with consistent indentation for subqueries and CTEs
- Copy the result to your clipboard and paste it into DBeaver, DataGrip, pgAdmin, Navicat, or a Jira ticket
- Take the formatted query into `EXPLAIN ANALYZE` on your database to spot bottlenecks in BI reports or ETL pipelines
All processing is done in your browser, and files are never sent to a server.
Frequently Asked Questions
Related tools
JSON Formatter
Format JSON for readability or minify it for production. Free in-browser tool that validates syntax live, pinpoints parse errors, and stays local.
JSON Validator
Validate JSON syntax, find formatting mistakes, and inspect structured data before using it in APIs, configs, or developer tooling.
JSON β XML
Convert JSON data to XML format quickly and accurately. Free in-browser tool β your data is processed locally, with no upload, signup, or watermark.
XML β JSON
Convert XML data to JSON format quickly and accurately. Free in-browser tool β your data is processed locally, with no upload, signup, or watermark.
JSON β YAML
Convert JSON objects and arrays into readable YAML with indentation preserved, useful for configs, APIs, and documentation workflows.
YAML β JSON
Convert YAML data to JSON format quickly and accurately. Free in-browser tool β your data is processed locally, with no upload, signup, or watermark.