Text processing

How to clean and organize a pasted list of text

Remove blank lines, trim whitespace, deduplicate and sort a list in the browser without uploading its contents.

By btools · 8 October 2026

Copied lists often contain blank rows, extra spaces and repeated entries. The text processor can clean these in a sequence. It works in your browser, so the text you paste is not uploaded to btools.

A concrete example

Suppose you paste this list, where the second line has spaces before the name:

Apple
  Pear

Apple
Banana

First choose Trim lines to remove spaces at the start and end of each line. Then choose Remove empty lines, followed by Remove duplicate lines. The result contains Apple, Pear and Banana once each. Choose Sort ascending if you want alphabetical order.

The order matters. Deduplication compares whole lines exactly, so Pear and Pear count as different until you trim them. Sorting first can make duplicates easier to spot, but it changes the original order. If order matters, leave sorting until the end or skip it.

Make a list ready for another app

Use Add prefix / suffix to each line to turn each entry into a bullet, numbered label or a simple quoted value. Find and replace changes every occurrence of the text you specify. Check the result before copying it, especially if your search text also appears inside longer words.

For structured data, Format JSON accepts valid JSON and indents it for reading. It reports an error for invalid JSON rather than silently changing the data. Formatting does not validate that your JSON fields have the meaning another application expects.

Keep the source while experimenting

Operations use the current result, so you can combine them. The input remains available while you work; edit it to begin a new sequence. Copy the final result only after checking line order, duplicates and punctuation.

Ready to try it?

All btools tools are free and run entirely in your browser.

Browse all tools