SQL formatter
Format SQL using the selected database dialect.
Bookmark this page
Keep this page handy for next time.
- On a computer
- Press Ctrl + D, or Command + D on a Mac.
- On a phone or tablet
- Open your browser's menu or Share menu and look for Add Bookmark, Bookmark or Add to favourites.
A bookmark saves the page link. Save any tool results separately.
How to use this tool
- Format SQL using the selected database dialect.
- Adjust the labelled settings, then run the tool. Copy the result or download it as a file.
Things to know
- Processing is local. Supplied code and network requests are never executed. Input and text settings are limited to 5 MiB combined; text settings alone are limited to 1 MiB.
- Formatting is not database validation and does not execute queries.
- Source: 2 MiB, 100,000 lexical tokens and 96 bracket/CASE nesting levels. Indentation is preflighted. SQL is formatted locally without connecting to a database.
You might also need
More in web developmentURL parser and builder
Inspect a URL and edit its path, query parameters or fragment.
CSS formatter and minifier
Format or minify CSS without executing it.
HTML formatter
Format HTML source while preserving whitespace-sensitive content.
JavaScript formatter and minifier
Format or minify JavaScript source without running the program.
HTML table extractor
Extract a selected HTML table into rows and CSV.
Chmod calculator
Convert Unix permission modes into readable permissions and a ready-to-copy command.
CIDR range combiner
Combine overlapping or adjacent address ranges into the smallest equivalent CIDR list.
Content Security Policy builder
Build a policy from explicit directives and check common unsafe settings.
Cron builder and explainer
Preview the next occurrences of a five-field cron expression.