SQL Formatter / Beautifier
Turn dense SQL into a readable, consistently indented layout with one clause per line, uppercased keywords, and aligned JOINs and subqueries.
ツール要約
このツールは構造化された入力を受け取り、サーバーへアップロードせずにブラウザで決定的な出力を返します。
- ツール名
- SQL Formatter / Beautifier
- 入力の目的
- 変換・検証・分析するソースコンテンツを入力してください。
- 出力の目的
- コピー・再利用・デバッグに適した正規化された出力を受け取ります。
- 入力例
- select id,name,email from users where created_at > now()-interval '7 days' order by id desc
- 出力例
- SELECT id, name, email FROM users WHERE created_at > now() - INTERVAL '7 days' ORDER BY id DESC
; are formatted independently.ツールの紹介
Turn dense SQL into a readable, consistently indented layout with one clause per line, uppercased keywords, and aligned JOINs and subqueries.
ツール概要
A well-formatted SQL query reads like a paragraph, not a wall of words. This tool tokenizes your statement, places each major clause (SELECT, FROM, WHERE, GROUP BY, ORDER BY, JOIN) on its own line, indents subqueries and CTE bodies, and uppercases standard keywords. It keeps quoted identifiers, string literals, and inline comments untouched. Works with PostgreSQL, MySQL, SQLite, SQL Server, and ANSI SQL.
ユースケース
- Clean up SQL pasted from logs or ORMs before reviewing it in a PR.
- Standardize team query style without installing a CLI formatter.
- Make a complex CTE chain readable for documentation or onboarding.
入力/出力の例
select id,name,email from users where created_at > now()-interval '7 days' order by id desc
SELECT id, name, email FROM users WHERE created_at > now() - INTERVAL '7 days' ORDER BY id DESC
よくある質問
Will it modify my data or run the query?+
Does it support PostgreSQL-specific syntax?+
Can it format multiple statements at once?+
他のツールを見る
下記の Developer カテゴリで関連ユーティリティを探す。
関連ツール
役に立ちそうな厳選ユーティリティ