About SQL Formatter
Pasted SQL is the most reliably unreadable form of code. A query pulled from an application log lands as one wrapped line, a query copied from Slack comes with random capitalisation, and the query generated by an ORM is technically correct but visually unparseable. The desktop options (DBeaver, DataGrip, IntelliJ) all have formatters, but firing one up just to clean a 30-line query someone shared is overkill. Most online SQL formatters either limit output length on the free tier, lock dialect-specific behaviour behind a paid plan, or insist on a signup.
This SQL formatter reformats SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER and the rest with proper line breaks, indentation and clause alignment. Configure keyword case — UPPERCASE, lowercase, or Capitalized (each in turn matches a different style guide; pick the one your team uses). Configure indent width from 1 to 8 spaces. Optionally strip comments if you're about to embed the query in an application string. The minify action collapses everything to one line with semicolons preserved — useful for embedding in a JSON config, copying into a one-liner shell command, or stuffing into a database client where multi-line input is awkward. A statement-type analysis panel tells you what kind of statements your input contains — useful for sanity-checking before running anything destructive. Works with MySQL, PostgreSQL, SQL Server, SQLite, Oracle and most ANSI SQL flavours.
Use it to clean up an ORM-generated query for review, format a query before pasting into a pull-request description, minify a SQL string for embedding in code, normalise whitespace before diffing two queries, or just make a single-line monstrosity readable before debugging. Inputs up to 1 MB — enough for any sane query including ones with large IN lists.