Line Sorter and Deduplicator
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
This tool sorts lines of text alphabetically and removes duplicate lines, helping you clean up lists, data sets, or any multi-line text. You paste or type text into the input area, choose your sorting and deduplication preferences, and the tool displays the processed result. It shows you how many original lines were processed, how many unique lines remain, and how many duplicates were removed. You can sort in ascending (A-Z) or descending (Z-A) order, enable or disable duplicate removal, choose case-sensitive or case-insensitive sorting, and optionally trim whitespace from each line.
WHERE IT RUNS
Runs on any website—no per-site configuration needed. Works entirely in the browser, so your text never leaves your machine. The panel can be opened on any page, making it a convenient tool for developers, data analysts, writers, and anyone who needs to clean up text quickly.
HOW TO USE
Install the userscript via BotGentz, then open the panel. Paste or type your text into the input area—each line will be processed separately. Choose your settings: sort order (ascending or descending), whether to remove duplicate lines, whether sorting should be case-sensitive, and whether to trim whitespace from each line. Click "Process Lines" to see the result. The output shows the cleaned list with statistics. Use "Copy Result" to copy the processed lines to your clipboard, or "Copy Input" to copy the original text. "Clear All" resets both input and output.
TECHNICAL MECHANISM
The tool processes text line-by-line using JavaScript's split('\n') method. Each line is then trimmed (if enabled) and filtered to remove empty lines. For duplicate removal, it uses a Set with a comparison function that respects the case-sensitive setting—if case-sensitive is off, lines are compared using toLowerCase() before being added to the Set. For sorting, it uses the native Array.sort() method with a custom comparator that respects both the case-sensitive setting and the sort order (ascending or descending). The processed lines are then displayed in a scrollable output area, with statistics displayed above the list. The tool never uses innerHTML with user-provided text; all text is escaped using textContent to prevent XSS issues (PLAYBOOK-A §6 rule 3).
THE PANEL
The floating panel is built with BotGentz's BGPanel framework. It is draggable—click and drag the panel header to reposition it anywhere on the screen. The panel remembers its position per site via the settings dropdown. It can be collapsed to a small bubble icon by clicking the minimize button, preserving screen space. The panel can be closed and reopened via the BotGentz toolbar. Press the Escape key to quickly close the panel. The panel automatically adjusts its layout for different screen sizes.
PLEASE NOTE
Requires the free BotGentz extension. This tool processes text entirely in your browser and does not send any data to external servers. Text is not stored or logged anywhere—only your settings are saved locally via GM_setValue. The tool is designed for moderate-sized text; very large text (100,000+ lines) may take a few seconds to process. Websites change frequently; if the tool stops working on a particular site, the script may need updating.