SQL Formatter
Prettify SQL for easier review, debugging, and documentation.
Format raw SQL so queries are easier to read, review, and debug before you run them in production systems.
What is this tool?
SQL is often generated by application code and delivered in a compact one-line format. Formatting makes queries easier to scan, especially when debugging joins, filters, and ordering logic. Developers also use SQL formatters when reviewing generated queries in logs or when preparing statements for documentation or code review.
Example
Raw SQL
Compact query
SELECT * FROM users WHERE active = true ORDER BY created_at DESC;
Formatted SQL
Readable output
SELECT * FROM users WHERE active = true ORDER BY created_at DESC;
Why use Cassidor?
- Useful for reviewing generated SQL quickly.
- Helps debug missing joins, filters, and ordering logic.
- Runs locally and keeps query text easy to copy and inspect.
Frequently asked questions
What does SQL formatting do?
It adds indentation and line breaks for readability without changing the logic of the query.
Is it safe to format SQL?
Yes. Formatting does not change the query logic, only the text layout.
When should I use this tool?
It is helpful when debugging generated queries, reviewing database logic, or preparing SQL for documentation.
Does formatting fix broken SQL?
No. Formatting will not repair invalid syntax, but it does make mistakes easier to spot.
Related tools
Format JSON instantly in your browser. Paste a payload, tidy the structure, and copy or download the result without affecting the data itself.
Test patterns against text to validate match logic, debug extraction rules, and quickly reason about regular expressions.
Convert Unix timestamps to readable dates and back again for logs, APIs, and time-based debugging workflows.