Input
Output
Schema detected
0 tablesAbout this formatter
Free SQL formatter that runs in your browser. Paste SQL, it formats as you type. Nothing gets uploaded.
We make DrawSQL, a database diagram tool. If your SQL contains DDL (e.g. CREATE TABLE statements), there's a button to open the schema on the canvas. That's the catch, and it's free too.
FAQ
Is my SQL uploaded anywhere?
No. Formatting and schema detection run in your browser, and what you paste stays in this tab. The one exception is the Turn this into a diagram button, which hands what you pasted to DrawSQL to open it on the canvas.
Does formatting change what my query does?
No. Whitespace and keyword case change, nothing else, and the query is never run.
Which SQL dialect should I pick?
The database the query will run on. Each dialect has its own keywords and quoting rules, and the parser needs the right ones. If you’re not sure, try them in turn. The status bar tells you when one fails to parse.
What is the difference between a SQL formatter and a SQL beautifier?
None. Both take SQL that’s hard to read and hand it back in a consistent layout. We say formatter. Search engines say both.