What is this tool?
Text Toolkit is a line editor for lists and plain text. Sort lines A to Z, by number, by length, or by a chosen word or column, with natural ordering so item2 comes before item10. Remove duplicates, blank lines, extra spaces, list numbers and bullets, HTML tags or accents. Keep or remove lines that contain a word or match a regular expression, and see the removed lines separately. Join lines with any delimiter and optional quotes, split them apart again, extract columns from CSV or tab-separated text, and count word frequency. Live stats show lines, unique lines, duplicates, words and characters. Your text stays in your browser.
How to Use
- Paste or type your text into the box, one item per line, or open or drop a text file onto it.
- Click a button to sort, remove duplicates, clean up, filter lines, join, split or extract a column. The box changes straight away.
- Set the options first if you need them, such as ignoring capital letters, the sort key, or the delimiter.
- Press Undo or Ctrl+Z to step back, and Redo or Ctrl+Y to step forward again.
- Copy the result, or download it as a .txt file with LF or CRLF line endings.
Frequently Asked Questions
Does it change my clipboard automatically?
No. The text only goes to your clipboard when you click Copy Result.
Why were "apple" and "apple " treated as the same line?
By default, spaces at the start and end of a line are ignored when lines are compared, so the duplicate count and Remove duplicates agree. Untick that option to compare lines exactly. Blank lines are not counted as duplicates and are left in place.
Can I use backreferences in find and replace?
Yes. With Use regular expression ticked, $1, $2, $& and $<name> in the replacement insert the matched groups.
How do I pull one column out of a CSV or tab-separated list?
Choose the delimiter in step 4, enter the column number (or several, such as 1,3) and click Extract column. Fields wrapped in double quotes can contain the delimiter.
Is my text uploaded?
No. Everything runs in your browser and nothing is sent to a server.
Can it fix broken UTF-8?
No. It works with the characters as entered, so fix the encoding where the text came from if characters look wrong.
Other tools
There are more calculators, converters and editors on Wivrix. If something is missing, tell us.