How to use
Pick a mode — Format, Minify, Analyze or Converters — and paste SQL into the input pane (you can also open or drop a .sql file).
Choose the dialect (Standard SQL, MySQL, PostgreSQL, SQL Server, Oracle, …). Quoting and comment syntax differ, so the result changes.
When formatting, set keyword case, indent width and comma position (end or start of line). When minifying, choose whether to drop comments or keep them as /* */.
Analysis lists the statement count, the kind of each statement, the tables it appears to reference (estimated) and warnings about dangerous statements.
Converters turn a newline-separated list into an IN clause, or a CSV / TSV with a header row into INSERT statements. Copy or download the result.
What it does
Formatting for 12 dialects
Standard SQL, MySQL, MariaDB, PostgreSQL, SQL Server (T-SQL), Oracle (PL/SQL), SQLite, BigQuery, Redshift, Snowflake, DuckDB and Trino. Choose keyword case, 2/4-space or tab indentation, comma position and line width.
One-line output that stays valid
String literals, quoted identifiers, PostgreSQL dollar quoting and Oracle q'[...]' are never touched. When comments are kept, -- and # comments are rewritten as /* */ so nothing after them gets commented out. Optimizer hints (/*+ */) and MySQL conditional comments (/*! */) are always preserved.
Analysis with danger warnings
Lists statement count and kinds (SELECT, INSERT, CREATE TABLE, …), referenced tables and comment count. UPDATE/DELETE without WHERE, DROP and TRUNCATE are flagged with the statement number and line.
Errors with a position
Unclosed strings, quotes and comments, and places the parser cannot read, are reported with line and column and a marked excerpt. “Go to error” selects the spot in the editor and your SQL is never cleared.
Dialect-aware IN lists and INSERTs
Value lists are detected as numbers or strings (IDs such as 007 stay strings). Single quotes are doubled, backslashes are escaped for MySQL / MariaDB / BigQuery, and SQL Server gets an N prefix for non-ASCII text. INSERT identifiers are quoted with ` ` / [ ] / " " to match the dialect.
Unicode-safe
Japanese and other non-ASCII identifiers, comments and strings pass through unchanged. Shift_JIS .sql and .csv files can be opened too.
Use cases
- Make a one-line query from a log or ORM output readable for review
- Squeeze SQL into one line to embed it in a config file or code
- Check a script for UPDATE/DELETE without WHERE or stray DROP statements before running it
- Turn a column of IDs from Excel or CSV into a WHERE ... IN (...) clause
- Convert CSV data into INSERT statements for test fixtures
Supported formats
Input
Output
Capability matrix
| Feature | Support | Notes |
|---|---|---|
| Formatting for 12 dialects (case, indent, comma position) | Supported | — |
| One-line minify that protects strings, quoted identifiers and comments | Supported | -- comments are converted to /* */ when kept |
| Statement count, kinds and warnings (UPDATE/DELETE without WHERE, DROP, TRUNCATE) | Supported | — |
| Referenced table extraction | Partial | Estimated from tokens; dynamic SQL and complex syntax can be missed or misread |
| List → IN clause, CSV/TSV → INSERT | Supported | — |
| Splitting statements inside stored programs | Partial | Approximated by matching BEGIN … END. Warnings (UPDATE/DELETE without WHERE, DROP) are scanned inside BEGIN … END, IF branches, $$ bodies, EXPLAIN and WITH, but table names are not extracted from $$ bodies |
| Running SQL / connecting to a database | Not supported | Your input never leaves the browser |
| Full syntax validation | Not supported | Unreadable spots are reported, but whether a database accepts the SQL is not checked |
| Automatic translation between dialects (e.g. MySQL to PostgreSQL) | Not supported | The dialect only switches formatting and quoting rules |
| Offline use | Supported | Works without a connection once loaded |
Limits & notes
- Input is limited to 2 million characters. Above 200,000 characters auto-run pauses and you press “Run”.
- CSV → INSERT accepts up to 200,000 rows and 500 columns; list → IN accepts up to 500,000 values.
- Oracle allows only 1,000 items in an IN list, so longer lists get a warning. Multi-row INSERT is capped at 1,000 rows per statement for SQL Server, and Oracle batches use the INSERT ALL form.
- Table names and statement kinds are estimates. Stored procedures, dynamic SQL and dialect-specific syntax may be read incorrectly.
- Formatting is done by sql-formatter (MIT), so some newer dialect-specific syntax is unsupported; it is then reported as a syntax error with its position.
- Line breaks inside string literals are preserved even in one-line output.
Privacy & safety
The SQL, lists and CSV you enter, and any files you open, are processed only inside your browser. Nothing is uploaded or stored, so queries with production table names or customer data are safe to format. Closing the page clears everything.
FAQ
What happens to -- comments when I minify SQL to one line?
Can formatting change the contents of my strings?
How are UPDATE or DELETE without WHERE detected?
Are values like 007 turned into numbers in the IN list?
Is my data sent to a server?
Why does SQL Server output add N before Japanese strings?
Related tools
CSV Encoding Fix
Convert CSV files that show garbled text in Excel to UTF-8 with BOM or Shift_JIS, with automatic encoding detection. Mojibake that was already saved, such as “日本語”, can usually be restored too.
CSV Studio
Open CSV files that are slow or garbled in Excel and view, search and edit them right away in your browser. Combine, split and save as CSV (UTF-8 with BOM, Shift_JIS), Excel or JSON on one screen.
CSV, JSON, XML & Excel Converter
Convert between CSV, TSV, JSON, JSON Lines, XML and Excel (.xlsx) by pasting or opening a file. Values stay as text by default, so zero-padded postal codes, phone numbers and long IDs are never changed. Everything runs in your browser; your data is not uploaded.
Data Health Check
Open a CSV or Excel table to get a list of problems — blanks, duplicates, spelling variants, garbled text and more — ranked by severity, a 0–100 health score and a profile of every column. Click a finding to see the affected rows; fixable problems link to the right tool.
Excel Cleanup
Tick what to fix and clean up spaces, character widths, dates and numbers across a whole Excel or CSV file at once. Changed cells are highlighted, and you can save as Excel or CSV.
Excel Compare
Load an old and a new Excel or CSV file to see added, removed and changed rows, with every changed cell shown as “old → new”. Save the result as a colour-coded Excel report or CSV.
Last updated: