Toffeekit
  • Home
  • All tools513
  • Recent
  • Favorites
Categories
  • Images51
  • Video21
  • PDF33
  • AI24
  • Data21
  • SEO12
  • Developer32
  • Text27
  • Design18
  • Files13
  • Utilities5
  • Productivity17
  • Finance26
  • Math39
  • Education19
  • Date & Time29
  • Converters43
  • Fun & Random24
  • SaaS13
  • Business17
  • Social11
  • Media5
  • Security13
Buy me a coffee
ToffeekitDeveloperSQL Formatter

SQL Formatter

Pretty-print SQL for Postgres, MySQL and more. Runs entirely in your browser — nothing you paste is sent anywhere.

Help
Runs locally Instant, no sign-up Works offline
How it works

How to use SQL Formatter

  1. 01Paste your query into the Input box, or click Sample.
  2. 02Pick a Dialect: SQL, Postgres, MySQL, SQLite or SQL Server.
  3. 03Switch UPPERCASE on or off to control the case of keywords.
  4. 04Click Copy or Save to keep the formatted query as query.sql.
Questions

SQL Formatter FAQ

6 answers to what people ask most about the SQL Formatter.

How do I format a SQL query?

Paste the query and the formatted version appears on the right, with each clause on its own line and joins and conditions indented.

Does the dialect setting matter?

Yes. It tells the formatter which keywords, quoting and functions to expect, so PostgreSQL features like ILIKE or MySQL backtick names are handled correctly.

Can I get lowercase SQL keywords?

Turn off the UPPERCASE switch. Keywords such as select and from are then written in lowercase.

Does formatting change what my query does?

No. Only whitespace and keyword case change. Identifiers, strings and values are left as you wrote them.

Why do I get a formatting error?

The formatter could not parse part of the query, often an unbalanced parenthesis or an unclosed quote. The message shows where it stopped.

Is SQL Formatter free and private?

Yes. It's free with no sign-up or limits, and it runs entirely in your browser, so what you type or paste never leaves your device. It works on phones and computers alike.

Something not working? Tell us and we'll fix it.

Report an issue
More tools
JSON Formatter

Format, minify and validate JSON with clear errors.

Developer
Base64 Encode / Decode

Encode text to Base64 or decode it back, UTF-8 safe.

Developer
URL Encode / Decode

Percent-encode query values or whole URLs.

Developer
HTML Entities

Escape < > & and quotes, or decode entities.

Developer
Something off with SQL Formatter? Report an issue or ask for a feature.Send feedback
© 2026 Toffeekit/Runs locally · No uploads · Free
AboutContactFeedbackPrivacyTermsCookiesSettingsllms.txt