# See what a SQL query does, step by step

> Paste a query. It explains the steps in plain English, draws the joins and flags slow or risky patterns.

Paste a SQL query to read each step in plain English, see the joins as a picture, get the formatted SQL and check for risky patterns. Runs in your browser.

- Tool: [SQL query visualizer](https://fixmint.cc/sql-query-visualizer)
- Category: [Web & developer](https://fixmint.cc/developer-tools)
- Fixes: What does this SQL do?
- Runs in the browser: files and text stay on the device, no sign-up, free.

## How to understand a SQL query

1. Paste the SQL in the box. Statements separated by semicolons are read one by one.
2. Read the steps in the order a database logically applies them, and the join picture below.
3. Check the warnings, then copy the formatted SQL when it looks right.

## Questions

### Which SQL does it understand?

Common SQL: SELECT with joins, subqueries, CTEs, UNION, GROUP BY with ROLLUP, window functions, plus INSERT, UPDATE, DELETE and a basic CREATE TABLE. Syntax it does not know is reported with its line and column.

### Does it run my query or connect to a database?

No. The query is read as text in your browser. Nothing is executed, and nothing is sent anywhere.

### Why do the steps not follow the order I wrote?

They follow the logical order: FROM and JOIN first, then WHERE, GROUP BY, HAVING, SELECT, ORDER BY and LIMIT. A database may run the work differently, but the result is the same.

## Related tools

- [Regex tester](https://fixmint.cc/regex-tester): Regex matches the wrong text
- [Compare JSON](https://fixmint.cc/compare-json): What changed in this JSON?
- [CSV cleaner](https://fixmint.cc/csv-cleaner): Messy CSV with blanks and copies
- [Excel formula checker](https://fixmint.cc/excel-formula-checker): Workbook has broken formulas
