Text Tool

Line Tools — Sort, Filter & Clean

Sort lines alphabetically or numerically, remove duplicates, filter by keyword, reverse order, shuffle randomly, trim whitespace, add line numbers, and remove empty lines. Essential text processing tools for logs, lists, and data cleanup. Runs in your browser.

Runs in browser Data never uploaded 10 operations Download output

Input

Output

Pro — regex filter, column sort, CSV row operations, multi-file processing, API access

API access · Priority queue · Team workspace

Upgrade — $19/mo

How It Works

STEP 1

Paste Your Lines

Paste any multi-line text into the input panel — a list of names, log entries, file paths, email addresses, keywords, code identifiers, or any text where each item is on its own line. The tool treats each newline-separated segment as one line. Click Sample to load a realistic list of country names with some duplicates and mixed ordering — a good test case for sort, deduplicate, and filter operations.

STEP 2

Click an Operation

Click any operation button: Sort A→Z, Sort Z→A, Sort Numeric, Sort by Length, Remove Duplicates, Reverse Order, Shuffle, Trim Whitespace, Remove Empty Lines, or Add Line Numbers. For filtering, type a keyword in the filter box and click Keep Matching (to keep only lines containing the keyword) or Remove Matching (to remove those lines). Toggle case sensitivity to control whether matching is case-insensitive.

STEP 3

Copy or Download

The processed result appears instantly in the output panel. The stats bar shows the input line count, output line count, and any duplicates or empty lines removed — helpful for verifying that the operation produced the expected number of results. Copy to clipboard for pasting into a spreadsheet, database tool, or code editor, or download as a text file.

Line Tools Features

10 operations for sorting, filtering, cleaning, and transforming line-based text

4 Sort Modes

Sort A→Z and Z→A perform locale-aware alphabetical sorting using the browser's built-in localeCompare, which correctly handles accented characters and Unicode letters. Sort Numeric parses each line as a number and sorts by value — useful for lists of scores, prices, or IDs. Sort by Length sorts shortest lines first, useful for finding brief lines in log files or identifying the longest keys in a dataset.

Remove Duplicates

Removes all repeated lines, keeping only the first occurrence of each unique line. Comparison is exact (case-sensitive) by default — lines that differ only in whitespace or capitalization are kept as separate entries. The stats bar reports how many duplicate lines were removed, which is useful for verifying list deduplication when combining data from multiple sources like mailing lists, keyword files, or access logs.

Keyword Filter

Filter lines by keyword with two modes: Keep Matching retains only lines that contain the keyword (like grep), and Remove Matching removes all lines containing the keyword (like grep -v). Toggle case sensitivity to match Error, error, and ERROR together, or keep the match exact. Useful for filtering log files, extracting specific entries from large lists, and cleaning up data exports.

Clean Operations

Trim Whitespace removes leading and trailing spaces, tabs, and other whitespace from each line without removing the line itself — useful for normalizing copy-pasted content from HTML, PDFs, or spreadsheets where invisible whitespace often attaches to values. Remove Empty Lines deletes lines that are blank or contain only whitespace, collapsing the list to only non-empty entries — essential for cleaning up log snippets and exported data files.

Add Line Numbers

Prepends a sequential number to each line in the format 1. line content. Numbers are padded to the same width so lists align correctly in monospaced contexts. Useful for creating numbered reference lists, adding sequence numbers to a dataset before importing into a spreadsheet, annotating log lines with sequence numbers, or producing numbered question lists for documentation and quizzes.

100% Private

All line processing operations run locally in your browser. No text is transmitted to any server, logged, or stored. Safe for processing log files containing IP addresses and user data, mailing lists with personal contact information, internal product names, file path lists from proprietary codebases, and any other sensitive line-based content that should not leave your device.

Free vs Pro

FeatureFreePro
All 10 line operations
Keyword filter (include/exclude)
Regex filter patterns
Column sort (delimiter-aware)
Process files (not just paste)
REST API access

Frequently Asked Questions

Paste your text in the input panel and click Remove Duplicates. The tool scans all lines and removes every line that appeared earlier in the list, keeping only the first occurrence of each unique line. The stats bar shows how many lines were removed. For case-insensitive deduplication (where "Apple" and "apple" are considered duplicates), the Pro version offers case-insensitive deduplication mode.

Sort Numeric parses each line as a floating-point number and sorts by numeric value in ascending order. Lines that cannot be parsed as a number (non-numeric lines) are sorted by their string value and placed after numeric lines. This is useful for sorting lists of scores, prices, version numbers (major version only), port numbers, and other numeric data where lexicographic sorting would give the wrong order (e.g., "10" sorts before "9" alphabetically but after it numerically).

The free version supports plain keyword filtering — lines are matched by whether they contain the keyword as a substring. Regex pattern filtering (e.g., filtering for lines matching ^\d{3}-\d{4}$) is a Pro feature. For basic filtering of log files by error level, domain name, or status code, plain keyword filtering covers most needs. Use the case-sensitive toggle to control whether the match is case-sensitive.

Sort by Length sorts lines from shortest to longest by character count. Lines of the same length are kept in their original relative order (stable sort). This is useful for finding short lines in a large file (possibly truncated entries or minimal entries), ordering words by length for linguistic analysis, checking that all entries in a dataset meet a minimum length requirement, or creating word lists for puzzle generation.

Yes — operations are applied to the current input. For chaining, apply an operation, copy the output, paste it back into the input, then apply the next operation. For example, to deduplicate and then sort: paste your list, click Remove Duplicates, copy the output, paste into input, click Sort A→Z. The Pro version supports operation chaining with a pipeline UI that applies multiple operations in sequence without manual copy-paste steps.

No — all operations run in your browser. Nothing is sent to any server. This makes it safe to process log files containing IP addresses and user sessions, mailing lists with personal email addresses, employee name lists, file paths from proprietary codebases, and any other sensitive line-based content. You can verify by opening browser developer tools and checking the network tab — no requests are made when operating on text.