Give your query space.
Make the logic easier to read.
Paste a query and format it in your browser. Your original stays intact.
Original query
0 charactersFormatted SQL
Ready to format.
Your query stays
on this page.
No SQL connection, upload, analytics payload or browser storage is used for query text. Reloading clears your work.
What changes
Spacing, line breaks and your selected keyword case are formatted. Identifier, function and data-type casing are preserved. String literals and comments are handled by the Transact-SQL formatter. Always review output before running it, especially vendor-specific or procedural syntax.
Large or unsupported queries
The input limit is 200,000 characters. Formatting runs separately from the interface; a slow request times out after five seconds. On an error, your original remains available. Editing the input or options clears stale output so you cannot accidentally copy an earlier result.
Formatter version 15.9.0. All formatting assets are served with this site.