Toolstia / Text case and line tools
Change text case and tidy lines
This page combines two jobs that often come together: changing the capitalization of text and tidying the structure of lines. There are four case options (UPPERCASE, lowercase, Sentence case and Title Case) and five line tools: remove line breaks, trim each line, remove duplicate lines, sort A to Z and sort Z to A.
Each button rewrites the text in the box right away, and you can undo up to twenty steps, so it is safe to try an option and step back. That makes it quick to fix a headline typed with caps lock on, clean a list pasted from a spreadsheet, or repair a paragraph that came out of a PDF with a line break after every few words.
The text is processed by your browser and is not sent anywhere. What follows explains exactly how each rule behaves, including a few places where it will need a human touch.
How it works
- Paste or type your text.
- Press an action. The text in the box changes straight away.
- Use Undo if you do not like it, then copy the result.
Sentence case and title case
Sentence case capitalises the first letter of each sentence. Title case capitalises the main words and leaves short words such as "of" and "the" lower case, except at the start. Names and acronyms may need a manual touch.
Removing line breaks
Joins lines that were wrapped in the middle of a sentence, for example in text copied from a PDF. Blank lines are kept, so paragraphs stay separate.
Duplicates and sorting
Duplicate lines are compared after trimming spaces, and the first copy is kept. Sorting ignores upper and lower case and puts numbers in natural order, so 2 comes before 10.
Undo
Each action can be undone, up to twenty steps back.
Where sentence case and title case need a manual check
Both modes first convert the whole text to lowercase and then rebuild the capitals, so anything that should keep its own capitalization is flattened. For example, "i met dr. smith in paris. NASA called" becomes "I met dr. Smith in paris. Nasa called". Sentence case capitalizes after a period, question mark, exclamation mark or line break, so a period after an abbreviation such as dr. makes the next word look like a new sentence, and proper nouns and acronyms lose their capitals.
Treat the result as a fast first pass and then fix names, acronyms and the letter I by hand.
The small words title case leaves alone
Title case keeps these words lowercase unless they begin the text: a, an, and, as, at, but, by, for, in, nor, of, on, or, the, to, up and vs. Everything else gets a capital. Running it on "the lord of the rings: the return of the king" gives "The Lord of the Rings: the Return of the King".
Notice that "the" after the colon stays lowercase, since only the very first word is treated as a start. Other quirks are that hyphenated words capitalize only the first part, so "state-of-the-art" becomes "State-of-the-art", and that "o'clock" becomes "O'clock". Different style guides disagree about these cases, so check the one you follow.
How remove line breaks treats paragraphs
The tool splits the text at blank lines, joins the lines inside each block with single spaces and keeps one blank line between blocks. Text copied from a PDF that reads "This is a long / line broken by a / PDF." becomes "This is a long line broken by a PDF." A paragraph separated by an empty line stays separate.
If your text has no blank lines at all, it becomes a single paragraph, which is what you want for a quote or a caption but not for a list. For lists, leave the breaks alone.
Duplicates and sorting on a real list
Duplicate removal compares lines after trimming spaces at both ends, and it keeps the first occurrence exactly as written. It treats uppercase and lowercase as different, so "Banana" and "banana" both stay, while "apple" and "apple " (with a trailing space) are counted as the same line. Blank lines are never removed.
Sorting ignores case and orders numbers naturally, so "item 1, Item 2, item 10" stays in that order instead of putting 10 before 2. An empty line sorts to the top. For a quick de-duplicated alphabetical list, run Trim each line first, then Remove duplicate lines, then Sort A to Z.
Cases the tool does not cover
There is no camelCase, snake_case, kebab-case or alternating-case option, and no change to curly quotes or dashes. UPPERCASE and lowercase use your browser's rules, so a German sharp s becomes SS in capitals. Case rules are language-specific, so for languages with their own conventions double-check the output.
Questions
Is my text uploaded?
No. Everything runs in your browser.
Does it work with other languages?
Case changes work for any language the browser understands. Title case rules for small words are written for English.
Can I run several actions in a row?
Yes. Each action works on the current text in the box.
Why did my acronym turn into a normal word?
Sentence and title case convert everything to lowercase first, so NASA becomes Nasa. Fix acronyms by hand afterwards, or use them only on text without acronyms.
Does Trim each line remove blank lines?
No. It strips spaces and tabs from both ends of every line and leaves empty lines in place. Use it before duplicate removal so stray spaces do not hide matches.
What does Nothing to change mean?
The action would give the same text it already has, for example making already uppercase text uppercase. The history is not extended in that case.
Can I undo after clearing the box?
No. Clear empties both the text and the undo history.
Does it handle Windows and Mac line endings?
Yes, the line tools treat both styles of line ending the same way, and the results use standard newlines.