SQL formatterFormatters

SQL formatter. One clause per line, readable again.

Paste a long query and get SELECT, FROM, JOIN, WHERE and the rest on their own lines, select lists split, AND and OR lined up and subqueries indented. Pick the dialect for its quoting rules. Strings and comments are kept as written.

Cost to you

Free

Runs in your browser. No signup, no API call, no limit per hour.

browser
runs in
none
API calls
none
account

Use it now

Use the SQL formatter here

It runs in your browser. Nothing you type is sent anywhere, there is no signup and no limit.

Loading the tool.

Run it from your agent

Copy one prompt, give it to your agent.

Fill in the placeholder, paste it, and the agent runs the same job with current data on your looot account and shows the cost.

  • You give it: a sql query.
  • Billed per call, nothing while your agent is idle.
  • The agent shows the price before it calls.
Prompt: SQL formatter
Use looot to review the SQL my agent wrote for a report. 1. Set up https://looot.ai/skill.md. 2. Format this query with one clause per line: [paste SQL]. 3. Explain what each clause does in one line. 4. Flag a missing WHERE on UPDATE or DELETE, SELECT star on a wide table and a join without a condition. 5. Return the formatted query and the flags.

Give this to your agent
Setup command
set up looot - https://looot.ai/skill.md

What comes back

What your agent gets from sql formatter

Field names as the providers return them. The exact set varies by endpoint, and your agent reads it from the catalog.

  • formatted SQL
  • one line SQL
  • keyword case
  • indent width

Use it for

What people do with sql formatter

  • Read agent SQL

    Format the one-line query an agent or an ORM logged so you can review it.

  • Tidy a migration

    Clean up a query before it goes into a migration or a pull request.

  • Debug a slow query

    Lay out the joins and filters so a missing condition stands out.

  • Minify for logs

    Collapse a formatted query to one line for a log or a string literal.

Set up once

Three steps. Your agent does the rest.

Keep going

FAQ

Questions about sql formatter

Paste it in the box. The formatted query appears as you type, with each clause on its own line. Copy it or download a .sql file.

Standard SQL, PostgreSQL, MySQL and MariaDB, SQL Server, SQLite and BigQuery. The dialect sets how quotes and comments are read: backticks in MySQL, square brackets in SQL Server, dollar-quoted strings in PostgreSQL and # comments in MySQL.

No. It lays out the text and never runs or parses it against a schema, so a typo stays a typo. Run the query in your database to check it.

No. Quoted strings, quoted names and comments are kept exactly as written, even when they contain commas or keywords.

Yes. Keywords can be UPPER CASE, lower case or kept as written. Table and column names are never changed.

It removes comments and line breaks and puts the query on one line with single spaces, for logs, string literals or a quick paste into a chat.

Partly. Queries inside a procedure are formatted, but BEGIN, END, IF and loops keep a simple layout. It is built for queries and DML, not procedural code.

No. Formatting runs in your browser, so queries with real table names stay on your machine.
For agents
tool
SQL formatter
category
Formatters
input
A SQL query
output
formatted SQL, one line SQL, keyword case, indent width
price
per call, read live from the catalog on the web page
web tool
runs in the visitor's browser, no API call, free and unlimited
schedule
on demand
setup
https://looot.ai/skill.md
llms.txt
https://looot.ai/llms.txt
updated
2026-10-14

Run sql formatter from your own agent.

Start your workspace, top up, and paste the prompt into the agent you already use. It runs the job with live data and shows the cost first.