テキスト
Sort & Dedupe Lines
テキストの行をアルファベット順にソートし、重複行・空行・余分な空白を削除。
This tool sorts a list of lines alphabetically and removes duplicates and blank lines — a routine cleanup that's slow and error-prone to do by hand.
How to use it
- Paste text (one value per line) and sorting and deduplication happen instantly.
- Pick an order (ascending, descending, or natural) depending on the kind of data.
- Turn on removal of blank lines and extra whitespace to get a clean result in one pass.
Common uses
- Turning a list of email addresses or usernames into a unique, sorted list before importing it.
- Sorting a list of files or versions with numeric parts in natural order (file2 before file10).
- Quickly cleaning up a list copied from a spreadsheet or document, removing duplicates and stray blank lines.
Things to keep in mind
Plain alphabetical sorting puts "file10" before "file2", since it compares strings character by character — natural sort is needed for the expected order with numbers.
Duplicate removal is case-sensitive by default — "Text" and "text" count as different lines unless the text is normalized to one case first.
よくある質問
大文字小文字を区別するソートと区別しないソートの違いは何ですか?
「大文字小文字を区別しない」がオフの場合、大文字と小文字は文字コードで別々にソートされます。オンにすると、大文字小文字に関係なく行を比較し、「Apple」と「apple」を近づけます。
重複、空行、空白はどのように処理されますか?
2つの同一行(選択した大文字小文字オプションによる)は重複と見なされ、最初の行のみが保持されます。「空白をトリム」はソート前に行の先頭と末尾のスペースを削除し、「空行を削除」は目に見える文字のない行を排除します。
私のテキスト行はサーバーに送信されますか?
いいえ、ソートと重複排除はブラウザ内で完全にJavaScriptで行われます — データはどこにも送信されません。
なぜアルファベット順ソートでは"10"が"9"より前に来るのですか?
アルファベット順(辞書式)ソートは、文字列を数値としてではなくテキストとして文字ごとに比較します: "1"は辞書順で"9"より小さいため、"10"が"9"より前に来ます。数値順にするには、文字列を先に数値としてパースする必要があります。
自然順ソート(natural sort)で並べ替えることはできますか?
自然順ソートは、文字列内の連続した数字を数値として認識し、それ以外はテキストとして比較します — これにより"file2.txt"は"file10.txt"より前に来て、テキストの接頭辞を持つファイル名やバージョン番号に便利です。