Tekst
Sort & Dedupe Lines
Sortuje wiersze tekstu alfabetycznie, usuwa duplikaty, puste wiersze i zbędne spacje.
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.
Artykuł o tym narzędziu: Sortowanie i usuwanie duplikatów wierszy: do czego się przydaje
Najczęstsze pytania
Jaka jest różnica między sortowaniem z rozróżnianiem a bez rozróżniania wielkości liter?
Gdy "Bez rozróżniania wielkości liter" jest wyłączone, wielkie i małe litery są sortowane osobno według kodu znaku; gdy włączone, porównuje linie bez względu na wielkość liter, zbliżając do siebie "Jabłko" i "jabłko".
Jak traktowane są duplikaty, puste linie i białe znaki?
Dwie identyczne linie (zgodnie z wybraną opcją wielkości liter) są uznawane za duplikaty i zachowywana jest tylko pierwsza; "Przytnij białe znaki" usuwa spacje na początku i końcu przed sortowaniem, a "Usuń puste linie" eliminuje linie bez widocznych znaków.
Czy moje linie tekstu są wysyłane na serwer?
Nie, sortowanie i usuwanie duplikatów odbywa się całkowicie w Twojej przeglądarce w JavaScript — żadne dane nie są wysyłane gdzie indziej.
Dlaczego "10" znajduje się przed "9" przy sortowaniu alfabetycznym?
Sortowanie alfabetyczne (leksykograficzne) porównuje ciągi znak po znaku jak tekst, a nie jak liczby: "1" jest leksykograficznie mniejsze niż "9", więc "10" trafia przed "9". Aby uzyskać porządek liczbowy, ciągi trzeba najpierw sparsować jako liczby.
Czy można sortować według porządku naturalnego (natural sort)?
Sortowanie naturalne rozpoznaje ciągi cyfr wewnątrz tekstu jako liczby, a resztę porównuje jako tekst — dzięki temu "file2.txt" znajduje się przed "file10.txt", co jest przydatne dla nazw plików lub wersji z tekstowym prefiksem.