08 / Text / line-tools

Line Tools

Sort, dedupe, trim, number, reverse, join and split lines.

ReadyLocal processing
08 · Workspace

How to use

  1. 01Paste your list into the Text box, one item per line; the label shows the current line count.
  2. 02Click an operation such as Remove duplicates, Sort A → Z, Trim whitespace or Remove empty lines. Each button rewrites the text in place, so you can chain several.
  3. 03To combine lines into one, set the Join / split separator (for example ", " or \t) and press Join lines.
  4. 04To break a single line into many, set the separator and press Split by separator.
  5. 05Press Copy or Download .txt to save the result, or Clear to start over.

What is this tool?

Line tools is a set of one-click operations for line-based text: remove duplicates, sort ascending or descending, trim whitespace, remove empty lines, add line numbers, reverse, shuffle, and join or split with a custom separator. It is built for cleaning up lists of IDs, emails, URLs and log lines without a spreadsheet or shell script. All processing happens in your browser.

Sorting and removing duplicate lines

Remove duplicates keeps the first occurrence of each line and drops later repeats, preserving the original order. Matching is exact, so "apple" and "Apple" or "apple " with a trailing space are treated as different lines. Run Trim whitespace first if stray spaces might hide duplicates.

Sort A → Z and Sort Z → A use natural, locale-aware ordering, so numbers inside lines sort by value: item2 comes before item10, rather than after it as in a plain character-by-character sort.

For example, the list banana, apple, apple, cherry becomes banana, apple, cherry after Remove duplicates, and apple, banana, cherry after Sort A → Z.

Joining and splitting lines with a separator

Join lines merges every line into a single line using the separator in the Join / split separator field, which defaults to a comma and a space. Split by separator does the reverse, breaking each line wherever the separator appears. The field accepts \t for a tab and \n for a newline.

This makes quick conversions easy: turn a column of IDs copied from a spreadsheet into a comma-separated list for a SQL IN clause or a query parameter, or turn a comma-separated value from a log or config back into one item per line for sorting and deduplication.

Numbering, reversing and shuffling lines

Add line numbers prefixes each line with its position, as in "1. first", "2. second". Reverse lines flips the order of the list, and Shuffle puts the lines in random order, which is handy for randomizing test inputs or picking a sample.

Operations can be chained in any order. A typical cleanup for a pasted list is Trim whitespace, then Remove empty lines, then Remove duplicates, then Sort A → Z, and finally Join lines to produce a single comma-separated value.

Common use cases

  • Deduplicating a list of emails, user IDs or URLs before a bulk test run
  • Turning a column of IDs into a comma-separated list for a SQL IN clause or API parameter
  • Sorting log lines or test names to compare them with another list
  • Removing blank lines and stray whitespace from pasted data
  • Shuffling test inputs to catch order-dependent behavior

FAQ

How do I remove duplicate lines?

Paste your text and press Remove duplicates. The first occurrence of each line is kept and the original order is preserved.

Is duplicate removal case-sensitive?

Yes. Lines must match exactly, including case and whitespace. Use Trim whitespace first to ignore leading and trailing spaces.

How do I sort lines alphabetically?

Press Sort A → Z, or Sort Z → A for reverse order. Numbers within lines are sorted by value, so item2 comes before item10.

How do I convert a list into comma-separated values?

Set the separator to ", " (the default) and press Join lines. Every line is merged into one comma-separated line.

Can I use a tab or newline as the separator?

Yes. Type \t for a tab or \n for a newline in the Join / split separator field.