SQL Formatter

Indent and capitalize SQL for readability, or minify it.

Free online sql formatter by AIML Digital. It runs 100% in your browser: no sign-up, no limits, and nothing you enter is sent to a server.

Formula

How it works

  1. Protect string literals, collapse whitespace, case keywords, break before major clauses and indent column lists and AND/OR conditions.

Frequently asked questions

Is the SQL Formatter free?

Yes. The SQL Formatter by AIML Digital is completely free, with no sign-up, no limits and no watermark.

Is my data sent anywhere?

No. The SQL Formatter runs entirely in your web browser using JavaScript. What you type stays on your device.

What formula does the SQL Formatter use?

Line breaks before: SELECT FROM WHERE JOIN GROUP BY ORDER BY HAVING LIMIT UNION ….

How does the SQL Formatter work?

Protect string literals, collapse whitespace, case keywords, break before major clauses and indent column lists and AND/OR conditions.

Does the SQL Formatter work on mobile?

Yes. It works in any modern browser on phone, tablet or desktop, and keeps working offline once loaded (except tools that load a helper library the first time).

More Developer tools