textcleanups

Sort lines

Put any list in order. Numbers sort the way people expect, so item 2 comes before item 10.

Options
Order

Your text stays in your browser. Nothing is uploaded or saved.

All text tools

Or fix everything at once with the all-in-one text cleaner.

AI-written text

ChatGPT text cleaner
Remove hidden characters, odd spaces and Markdown from AI answers.
Remove em dashes
Replace every — with a comma, period or hyphen.
Remove Markdown
Turn Markdown into plain text: no **, #, links or tables.
AI phrase finder
Highlight overused AI words and phrases.

Lines

Remove line breaks
Turn text broken across many lines back into clean paragraphs.
Remove duplicate lines
Keep the first copy of every line and delete the repeats.
Remove empty lines
Delete blank lines, or cut long gaps down to one.
Sort lines
Sort a list A to Z, Z to A, by length, reversed or shuffled.
Add line numbers
Number every line, your way.
Remove line numbers
Strip numbers and bullets from the start of lines.
Comma separator
Turn a list into comma-separated text, and back.

Spaces and characters

Remove extra spaces
Collapse double spaces, trim lines and replace tabs.
Remove special characters
Strip symbols and keep only letters, numbers and punctuation you choose.
Remove emojis
Delete every emoji, including skin tones, flags and combined emoji.
Remove accents
Turn é into e, ü into u and ß into ss.
Convert smart quotes
Turn curly quotes, long dashes and ellipses into plain text.

Formatting and counting

Case converter
Switch text to sentence case, Title Case, UPPERCASE, camelCase and more.
Find and replace
Replace words or patterns across your text, with regex support.
Strip HTML tags
Turn HTML into clean, readable plain text.
Word counter
Count words, characters, sentences and reading time as you type.
Text diff checker
Compare two texts and see what changed.
Word frequency counter
See which words you use most.
Reverse text
Flip text backwards, by letter, word or line.

How to sort lines

  1. Paste your list into the first box, one item per line.
  2. Choose an order. The result updates as you switch.
  3. Copy the sorted list from the result box.

Natural sorting for numbers

Basic sorting compares text one character at a time, so Chapter 10 lands before Chapter 2 because "1" comes before "2". This tool compares numbers inside the text by their value instead, the way a person would. That's called natural sorting, and it's what you want for file names, chapters, versions and addresses.

The sort orders

  • A to Z and Z to A: alphabetical, with accented letters sorted next to their plain versions.
  • Shortest first and Longest first: by number of characters. Lines of the same length are sorted alphabetically.
  • Reverse: flips the current order without sorting. Handy for logs or lists that are newest-last.
  • Shuffle: random order, for picking names, team assignments or quiz questions. Switch away and back to shuffle again.

Common uses

  • Alphabetizing names, references or glossary terms
  • Sorting keyword lists or tags
  • Ordering file names or version numbers
  • Randomizing a list for a draw or a seating plan

Questions

Does uppercase sort before lowercase?

Not by default. With Ignore uppercase and lowercase on, apple and Apple sort together. Turn it off to keep capitalized lines just ahead of lowercase ones with the same letters.

Can I sort and remove duplicates at the same time?

Sort here first, then paste the result into the remove duplicate lines tool. Or do it the other way round to keep the first copy of each line.

Is the shuffle truly random?

It uses the Fisher-Yates method with your browser's random number generator. That's fine for everyday draws, but don't use it for anything legally regulated, like a prize lottery.