Skip to content
Tooldict

SQL Formatter

Turns hard-to-read, single-line SQL queries into a neatly indented form with uppercase keywords.

Result

About

Puts SELECT, FROM, WHERE and JOIN on their own lines and indents them, and uppercases keywords. Makes complex queries easier to review, debug and share.

All processing happens in your browser; your queries are never sent to a server.

How to use

  1. Paste your SQL query into the box.
  2. The formatted query is produced instantly.
  3. Copy the result.

Frequently Asked Questions

Which SQL dialects are supported?
Standard SQL syntax is supported; common SELECT/INSERT/UPDATE/DELETE and JOIN structures format correctly.
Is my query changed?
No. Only whitespace, indentation and case are adjusted; the query's logic stays the same.

Other tools

Embed this tool

Copy the code below and paste it into your site's HTML to embed this tool for free. The snippet includes an attribution link back to the source.

<iframe src="https://tooldict.com/embed/en/sql-formatter" title="SQL Formatter" width="100%" height="600" style="border:1px solid #e2e8f0;border-radius:16px;max-width:680px" loading="lazy"></iframe>
<p style="font:13px/1.5 sans-serif">Powered by <a href="https://tooldict.com/en/sql-formatter" target="_blank" rel="noopener">SQL Formatter</a> — Tooldict</p>