RevealTheme logo

SQLフォーマッター

SQLクエリを整形して読みやすくします。キーワードで改行し、カラムのリストにインデントを付けます。

このツールの使い方

  1. 1

    Paste or type your SQL query into the input box.

  2. 2

    The formatted version appears instantly in the read-only panel below — there is no separate Format button.

  3. 3

    Select the output text and copy it manually into your editor or query tool.

SQLフォーマッターとは何ですか?

minify(縮小)された、あるいは1行にまとまったSQLを読むのは苦痛です。このフォーマッターは、主要なキーワード(SELECT、FROM、WHERE、JOINなど)で改行し、カラムのリストにインデントを付けて読みやすくします。出力は入力と機能的に同一であり、整形によって意味が変わることはありません。

よくある活用例

  • Untangling a one-line SQL query copied out of an application log or ORM debug output so you can read it.

  • Quickly making a SELECT with a long column list scannable before reviewing it in a pull request.

  • Normalizing keyword casing to uppercase across an ad-hoc query you wrote in lowercase.

  • Pasting a minified query from a config file or migration into a readable shape for documentation.

  • Teaching or explaining a query's clause structure by breaking SELECT, FROM, WHERE, and JOIN onto their own lines.

  • Doing a fast cleanup before a query is too short to justify opening a full IDE formatter.

よくある質問

これは私のクエリを書き換えますか?
いいえ。整形は純粋に見た目だけのものです。正しさのチェックが必要な場合は、出力をlinterに通してください。

関連ツール