Text Reverser & Cleaner

Reverse characters, reverse line order, remove duplicate lines, or strip whitespace from any text.

text-reverser.js

This tool bundles four small text-cleaning utilities in one place. Reverse the characters in a string, flip the order of lines (useful for reversing a list), remove duplicate lines from a pasted list, or strip leading, trailing and repeated whitespace to tidy up messy pasted text — all applied instantly to the text box.

How to use it

  1. Paste your text into the box.
  2. Choose the operation: reverse characters, reverse lines, remove duplicates, or strip whitespace.
  3. The result replaces the box content immediately.
  4. Copy the cleaned-up text when you're done.

Frequently asked questions

What's the difference between reversing characters and reversing lines?

Reversing characters flips the entire string back to front (e.g. 'hello' becomes 'olleh'), while reversing lines keeps each line intact but flips their order — useful for reordering a pasted list.

Does removing duplicate lines care about capitalisation?

Yes, it treats 'Apple' and 'apple' as different lines by default since it compares exact text.

Will stripping whitespace remove blank lines too?

It trims leading/trailing spaces on each line and collapses multiple blank lines into one, without deleting all paragraph breaks.