Loadingโฆ
Loadingโฆ
Format and beautify SQL queries for SQL Server (T-SQL), PostgreSQL, MySQL, Oracle, and more. Set the indentation, keyword case, and layout, and get the exact line of any syntax error.
Also covers: SQL beautifier ยท SQL minifier
Formatted SQL appears here as you type. Pick your dialect above โ T-SQL is the default.
Paste a query or a whole script, drop a .sql file on the input, upload one, or load it from a URL. It's formatted as you type, so you can clean up a query while you're still editing it.
Choose the database the SQL is written for. SQL Server (T-SQL) is the default and understands [bracketed] names, @variables, N'unicode' strings, TOP, and GO batch separators. PostgreSQL, MySQL, Oracle, and others each read their own syntax.
Set the indent, choose UPPERCASE or lowercase keywords (functions and data types follow the same setting), and decide whether AND / OR start or end a line. The Tabular layout lines up clause keywords in a left-hand column.
Copy the result, download it as a .sql file, or open it full-screen with Expand. If the SQL can't be parsed, the error shows the line and column. Click it to jump to the problem in your input.
No. Formatting runs in your browser, so queries with table names, customer data in literals, or connection-specific details never leave your machine. Nothing is executed either: the tool only reads and re-indents the text.
Databases disagree on syntax. SQL Server quotes identifiers with [brackets] and uses @variables, PostgreSQL has :: casts and $1 parameters, and MySQL uses `backticks`. Formatting with the wrong dialect can misread these as errors or split them in odd places, so pick the one your query targets.
The formatter has to parse the query to lay it out, so it stops on things like an unclosed parenthesis, an unterminated 'string', or a stray comma. The message gives the line and column; click it to jump there. The check isn't a full validator, so SQL that formats cleanly can still fail against your real schema.
No. Only whitespace, line breaks, and keyword casing change. Identifiers, string literals, and comments are kept exactly as written. Choose "As written" for Keywords if you don't want casing touched either.
Yes. That's why it's here. LLM text-to-SQL output usually arrives as a single long line, and formatting it is the quickest way to review the joins, filters, and grouping before you run it. It's the same review step the AI Database Agent project builds into its validation pipeline.
Data
Format, validate, and minify JSON in your browser. Paste it, upload a file, or load it from a URL. Errors show the exact line and column.
C# / .NET
Paste JSON and get C# model classes or records, ready for System.Text.Json or Newtonsoft.Json. Nested objects, arrays, nullable types, dates, and GUIDs are inferred for you.
TypeScript
Paste JSON and get TypeScript interfaces or type aliases, with nested objects named for you, optional and nullable fields detected from every array item, and union types.
SQL
Turn a JSON array into a CREATE TABLE with inferred column types and batched INSERT statements for PostgreSQL, MySQL, SQL Server, or SQLite.
Data
Format, validate, and minify XML (config files, .csproj, SOAP, RSS) in your browser. Entities, CDATA, and mixed content are kept exactly as written, and errors show the line and column.
Data
Format and validate YAML (docker-compose, Kubernetes, GitHub Actions) without losing comments, or convert YAML to JSON. Errors show the exact line and column.