SQL Formatter

Paste messy SQL and get clean, readable, consistently indented queries.

๐Ÿ”’ Runs in your browserโšก Instant results๐Ÿ‘ค No sign-upโญ Downloads with Pro

Make messy SQL readable

Paste any SQL query, from a one-line monster copied from a log to a long report query, and get it neatly laid out: each clause on its own line, columns listed one per line, JOINs and their ON conditions lined up, AND/OR conditions indented, CASE statements and sub-queries nested clearly.

Safe by design

After formatting, the tool compares the original and formatted SQL piece by piece and confirms that only spaces, line breaks and keyword capitals changed. Your table names, column names, strings and numbers are never touched.

Works with

MySQL, SQL Server (T-SQL), PostgreSQL, SQLite, Oracle and most other SQL dialects, including comments, quoted names like [Order Date] Or `order date`, and Postgres casts like ::date.

Frequently asked questions

Is my SQL sent anywhere?

No. Formatting happens in your browser.

Can it fix errors in my SQL?

It formats SQL but does not change or correct it. A missing comma or bracket will still be missing, just easier to spot.

More data analysis & spreadsheet tools

๐Ÿ“Š
Excel Data AnalyserInstant KPI dashboard, insights, report & slides
๐Ÿ“ˆ
Instant DashboardPower BI style dashboard from any Excel file
๐Ÿ”
CSV โ†” Excel ConverterConvert CSV, XLSX, XLS, ODS and JSON
๐Ÿงฉ
Excel File MergerCombine many spreadsheets into one
๐Ÿงน
Duplicate RemoverFind and delete duplicate rows
๐Ÿ“ˆ
Chart MakerPaste data, get a chart, download PNG or PowerPoint
๐Ÿ—„๏ธ
Excel to SQLCREATE TABLE & INSERT statements from any spreadsheet
๐Ÿงฎ
SQL Query BuilderBuild SQL with clicks, explained in English, run on your data
โœจ
SQL FormatterMake messy SQL clean and readable
๐Ÿงฝ
Data CleanerFix spaces, capitals, text numbers, dates, blanks and duplicates
๐Ÿ”—
VLOOKUP / Merge Two SheetsMatch two files on a shared column, no formulas
๐Ÿ†š
Compare Two Excel FilesSee added, removed and changed rows and cells
๐ŸงŠ
Pivot Table BuilderGroup, total and chart your data with clicks
๐ŸŒ
Web Table to ExcelCopy tables from websites into clean Excel
๐Ÿ”ฃ
JSON โ†” Excel ConverterFlatten JSON into a spreadsheet, or Excel into JSON
๐Ÿ“
UK Postcode Lookup (Bulk)Add council, region and lat/long to postcodes
๐Ÿ”„
Unpivot / Reshape DataColumns to rows and back, ready for Power BI
๐ŸŽฏ
Outlier FinderSpot unusual values, typos and errors
๐Ÿ“
Statistics CalculatorMean, SD, correlation, t-test, chi-square explained
๐ŸŽฒ
Random Sample PickerRandom rows for audits, surveys and prize draws
๐Ÿงช
Test Data GeneratorRealistic fake UK data for testing and demos

See all 108 tools โ†’