How to use SQL Formatter
- Paste a SQL query or script into the editor.
- Choose its SQL dialect and keyword case.
- The formatted query updates as you change the dialect or the keyword case. Copy the spaced query.
- Review the query in your own database environment before running it.
Example: SQL Formatter
Lay out a short SELECT query.
Supported inputs and limits
Where your input is processed
This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.
Questions about SQL Formatter
Will this page run my SQL?
No. It only rewrites text in your browser and has no database connection.
Which dialect should I choose for MariaDB?
Choose MariaDB; its keywords and syntax can differ from other SQL engines.
Does a formatted query mean it is valid?
No. Formatting does not check table names, data types or whether the query will run.
Can formatting change my comments?
The formatter tries to retain comments, but spacing around them can change. Review the result before use.