SQL Viewer
View, pretty-print, and syntax-highlight SQL statements in a collapsible tree.
How to Use
- Paste a SQL query.
- Pick keyword case and indent.
- Copy formatted result.
Paste SQL above.
Notes
About the SQL Viewer
Working on image, audio and file tasks? The SQL Viewer is a free browser tool that gives you the answer in seconds. View, pretty-print, and syntax-highlight SQL statements in a collapsible tree.
How it works
Type in what you have, and the answer shows up right away. Change anything and it updates by itself. Everything runs in your browser, so it is fast and nothing you type is sent away.
Want the deeper story? The Knowledge Base explains the ideas behind the tools in more detail.
Frequently Asked Questions
Dialect?
Mostly ANSI. Handles common PostgreSQL/MySQL/SQLite clauses.
Strings?
Single- and double-quoted string literals are preserved verbatim. Dollar-quoted bodies ($$…$$) are not tokenized specially, so their contents may be reflowed.
How do I use the SQL Viewer?
Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.
Do I need to install or sign up for anything?
Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.
Is my information private?
Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.
Common Use Cases
Log cleanup
Format a one-liner back to readable.
Code review
Consistent style.
Last updated: