SQL Prettify
Format SQL queries with readable indentation, clause breaks, and keyword casing controls.
SQL input
Paste one or more SQL statements. The app formats them live, checks for unbalanced parentheses or unfinished strings, and keeps everything in your browser.
Formatted SQL
Ready to format SQL.
When to use SQL Prettify
SQL Prettify helps when you need readable queries for coding, review, or troubleshooting:
- Quick task completion
Paste a messy query, format it in seconds, and move straight back to coding or review.
- Input validation
Catch unbalanced parentheses and unfinished strings before you share or run the query elsewhere.
- Workflow debugging
Compare long joins, filters, and subqueries in a readable layout while debugging edge cases.
- Result sharing
Copy or download clean SQL for tickets, pull requests, handoff notes, or internal docs.
- Mobile usage
Review and prettify SQL on a phone or tablet when you need a quick sanity check away from your desk.
Frequently Asked Questions
- How do I use this app?
- Enter or paste SQL into the input area, adjust the formatting controls if needed, review the formatted result, and then copy or download it. Use Clear or Reset options when you want to start fresh.
- Is this app free to use?
- Yes. SQL Prettify is free to use and does not require an account.
- What happens to my input data?
- Your SQL stays in the browser. The app does not store it, and it does not require a network request to format or validate the query.
- Why am I getting an error or unexpected output?
- Most problems come from unfinished strings, unbalanced parentheses, or input that is not valid SQL. Fix the issue in the input and the formatter will update again automatically.
- Where can I find instructions and troubleshooting tips?
- Open the in-app Help panel for usage steps, formatting control explanations, and troubleshooting tips. The panel works with a keyboard and closes with Escape.
SQL Prettify Help
How to use
- Paste or type SQL into the input field, or load the example query to try the formatter quickly.
- Choose the keyword casing and indentation size you want, then let the app update the formatted result live.
- Copy or download the formatted SQL when it looks right, or reset the controls and clear the input to start over.
What the controls do
- Switch between preserved, uppercase, and lowercase SQL keyword styles.
- Choose a 2-space or 4-space indentation width for nested clauses and subqueries.
- Copy the formatted SQL or download it as a .sql file for reuse elsewhere.
- Get inline feedback when the SQL looks incomplete or contains unfinished strings or comments.
Tips
- The app formats SQL locally in your browser and does not submit your query to the server.
- Use the example query if you want to test the controls before formatting your own statement.
- If the formatter shows an error, fix the highlighted issue in the input and the output will refresh automatically.
Keyboard shortcuts
| Ctrl + Enter | Re-run formatting and focus the output panel. |
| Esc | Close the Help panel when it is open. |