Works on this device
Text & List Editor
Paste a list or any text and choose what to do with it: sort it, take out duplicates, replace words, join or split lines, and more. Each result says what was changed and how much. Your text is changed in this browser and is not uploaded.
Your text
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your changed text will show here
Type or paste some text, or choose Try an example.
Your changed text
How it was worked out
How to use the editor
- Choose a task in the menu What do you want to do?
- Type or paste your text, or choose Or open a file from your device. Text files, Word .docx files and PDF files with real text can be opened.
- Set the options of the task. The result updates as you type.
- Read the numbers above the result. They say how many lines, items or characters were changed, removed or left out.
- Choose Copy text or Download file to keep the result. To do a second task on the result, copy it and paste it into the box.
What each task does
- Sort a list: A to Z, Z to A, with numbers in number order (
item 2beforeitem 10), or by length. The items can be lines or be separated by commas, semicolons or spaces. - Remove or find duplicate lines: keeps the first copy of each line. It can also give you only the lines that are repeated, with how many times each one was found.
- Remove empty lines: all of them, or all but one where there are several.
- Remove line breaks (join lines): joins the lines with a space, a comma, nothing or your own text. It can keep paragraph breaks, which helps with text copied from a PDF.
- Split text into lines: puts each item of a list with commas, semicolons, tabs or your own separator on its own line.
- Find and replace: replaces a word or any text everywhere. Add more pairs to replace several things at once. You can match whole words only or match capital letters exactly.
- Reverse text, words or lines: writes each line backwards, turns each word around, or puts the words or the lines in the opposite order.
- Remove extra spaces: removes spaces at the ends of lines, makes double spaces single, changes tabs to spaces or spaces to tabs, and changes no-break spaces to normal spaces.
- Remove punctuation, digits, letters or special characters: also invisible characters, accent marks, or a set of characters that you type. A table lists every character that was removed.
- Number the lines: with the first number, the step and the mark after the number that you choose.
- Add text before or after each line: for example a bullet, quote marks or a comma.
- Align or wrap text to a width: left, right, center or justified with spaces, for plain text in a fixed-width font.
- Make quotes, dashes and Unicode form plain: curly quotes become straight quotes, long dashes become hyphens, and you can choose a Unicode form such as NFC.
What is kept and what is changed
- Only the thing that the task names is changed. All other characters, spaces and lines stay as they are.
- Nothing is dropped without a count. If lines, items or characters are removed or left out, the result says how many.
- Line breaks are written in the same style as the first line break of your text. A line break at the very end is kept. Joining lines is the one task that ends without a line break.
- Letters with accents, emoji made of several parts and text in any script are handled as whole characters. They are never cut in half.
- The download and the copied text hold the whole result.
How the list is sorted
- Items are compared character by character in the order of Unicode code points, after spaces at the ends and accent marks are taken off. So
éclairsorts with the letter e, not after z. - With Treat capital and small letters as the same ticked,
appleandApplesort together. Without it, all capital letters come before all small letters. - Digits come before letters. With the number order, a run of digits is read as a whole number:
9comes before10, and007equals7. Signs and decimal points are not read as part of the number. - Items that compare as equal keep a fixed order: by their exact text, then by their place in your list.
- This is a simple rule that gives the same result in every browser. It is not the full dictionary order of each language. For example, it does not know that Swedish puts ä after z.
- To put a reference list in order, each reference must be on one line.
Find and replace in detail
- Every match is replaced, from the start of the text to the end. Matches do not overlap: in
aaaa, the textaais found two times. - With more than one pair, the pairs are used one after the other. A later pair also changes text that an earlier pair has put in.
- Leave Replace with empty to delete what is found. A space can be the text to find.
- Under More options you can read
\nas a line break and\tas a tab, or read Find as a regular expression. - Regular expressions follow the rules of JavaScript and run with the flags g, m, u and (unless you match capital letters exactly) i. A pattern can have up to 200 characters and the text up to 200,000 characters. In Replace with,
$1is the first group and$&is the whole match.
Worked example
The list has 9 lines: banana, Apple, cherry, an empty line, apple, 10 pears, 9 plums, banana and date (with spaces around it).
Sort, A to Z gives 10 pears, 9 plums, Apple, apple, banana, banana, cherry, date : 8 items, and 1 empty item is left out. 10 pears comes before 9 plums because the digit 1 comes before 9. With numbers in number order, 9 plums comes first.
Remove duplicates with capital and small letters as the same gives 7 lines from 9. Two copies are removed: the second banana, and apple, which is the same as Apple. The table lists banana and Apple with 2 each.
Remove line breaks with a comma gives banana, Apple, cherry, apple, 10 pears, 9 plums, banana, date: 8 lines are joined, 8 line breaks are removed and 1 empty line is left out.
Number the lines gives 1. banana to 8. date . The empty line gets no number.
Limits you should know
- The tool takes up to 1,000,000 characters and files up to 5 MB. Scanned PDF pages are pictures and cannot be read.
- One task is done at a time, on one text. Files on your device are not changed, and many files cannot be changed at once.
- A regular expression with repeats inside repeats can take a very long time on some texts. If the page stops answering, reload it.
- Aligning and wrapping count each character as one column. This lines up only in a fixed-width font. Wide characters such as Chinese or emoji take more room.
- Removing accent marks works for Latin and Greek letters. Letters such as ø, ß and ł have no separate mark and stay.
- The count of characters can differ a little between browsers for some scripts, such as Hindi, because browsers do not all group their marks in the same way.
- The tool does not check grammar, commas or spelling, does not pick random items, and does not cut text to a length.