
Remove Duplicate Lines
Remove repeated lines while retaining first occurrence order.
Open toolClean up pasted text in one click: trim leading and trailing line spaces, collapse repeated spaces and tabs, remove blank line separators to condense paragraphs, and normalize letter case.
Enter the inputs, then select Format text.
Result will appear here
When you copy text from PDFs, emails, OCR scans, or terminal logs, it often arrives with ragged spaces, tab gaps, and empty lines between paragraphs. This deterministic formatter runs four cleanup passes in order.
Pass 1: Normalize CRLF/CR line endings to LF and trim leading/trailing spaces on every line. Pass 2: Collapse repeated internal spaces/tabs into a single space (optional). Pass 3: Remove blank lines (optional). Pass 4: Apply UPPERCASE, lowercase, or Simple Title Case.
Your wording and punctuation are never rewritten or altered by AI; only whitespace, blank lines, and selected letter casing are modified locally.

Which combination of Spaces, Blank lines, and Letter case settings to choose for common cleanup tasks.
| Cleanup Goal | Spaces and Tabs Setting | Blank Lines Setting | Letter Case Setting | Resulting Output |
|---|---|---|---|---|
| Condense separated paragraphs & remove blank lines | Collapse repeated spaces/tabs | Remove | Keep | Removes empty line gaps and double spaces so paragraphs pack tightly |
| Clean ragged PDF / OCR copy-paste spacing | Collapse repeated spaces/tabs | Keep | Keep | Preserves paragraph breaks while fixing tab gaps and double spaces |
| Normalize heading or list capitalization | Collapse repeated spaces/tabs | Remove | Simple Title Case | Trims lines, removes blank rows, and capitalizes each word |
| Standardize lowercase tags or keywords | Collapse repeated spaces/tabs | Remove | lowercase | Outputs a clean, lowercase, single-spaced list with no empty lines |
| Trim line edges while keeping column alignment | Keep internal spacing | Keep | Keep | Trims outer line whitespace without collapsing internal multi-space columns |
Paste your raw text, pick your whitespace and blank-line rules, and copy the cleaned result.
Paste your paragraph, list, or PDF excerpt into the Text to format textarea.
Select Collapse repeated spaces/tabs to turn multiple spaces or tabs into a single space, and set Blank lines to Remove if you want to strip empty line separators between paragraphs.
Keep your existing capitalization or choose UPPERCASE, lowercase, or Simple Title Case, then select Calculate to copy or download the cleaned text.
Fix broken spacing from PDFs, condense multi-paragraph notes, and clean data lists.
Set Blank lines to Remove and Spaces and tabs to Collapse. Every empty line between paragraphs is stripped out and extra internal spaces are reduced to single spaces.

Justified PDFs often insert two or three spaces between words when copied. Collapsing spaces and tabs restores clean single-spaced sentences immediately.

Removing blank lines and trimming leading/trailing spaces ensures every remaining line is non-empty and free of invisible trailing whitespace.

Understand how line trimming, blank-line removal, and Simple Title Case behave.
Every line has its leading and trailing spaces trimmed automatically. When Blank lines is set to Remove, any line that is empty (or contained only spaces/tabs) is deleted so the remaining paragraphs sit on consecutive lines.
Simple Title Case lowercases the text and capitalizes the first letter of every letter sequence. If your text contains acronyms like HTML, NASA, or USA, review them after applying title case.

Check whether your text relies on leading indentation before running the formatter.
Because the formatter trims leading whitespace on each line, do not use it on Python code or YAML files where leading indentation carries syntax meaning.
Removing blank lines deletes empty lines between paragraphs while keeping a single newline between non-empty lines.


Remove repeated lines while retaining first occurrence order.
Open tool
Remove characters in the Unicode Punctuation category and keep letters, numbers, symbols and whitespace.
Open tool
Turn nonempty text lines into SRT captions with equal durations. Choose a start time, download the cues and adjust their timing against your audio.
Open toolChoose another tool for your next calculation, conversion, or text task.

Convert ASCII words to PascalCase identifiers.
Open tool
A PDF containing selected pages in your order. Parse 1-based page numbers and ranges, then copy the selected pages into a new PDF.
Open tool
Convert separated ASCII words to lower camel case.
Open tool
Use this free DOI formatter to clean raw 10.xxxx strings, doi: labels, or dx.doi.org links into bare DOIs and https://doi.org/ URLs for APA 7, MLA 9 & BibTeX.
Open toolAnswers about using Online Text Formatter and understanding its results.
Paste your text, set 'Spaces and tabs' to 'Collapse repeated spaces/tabs', and set 'Blank lines' to 'Remove'. This strips all blank lines between paragraphs and collapses extra spaces.
No. It is a deterministic whitespace and case formatter. Your words, numbers, and punctuation marks remain untouched.
Collapse replaces any run of 2 or more spaces or tabs inside a line with a single space. Keep internal spacing trims only the start and end of each line while leaving internal spaces and tabs intact.
It converts each word so the first letter is uppercase and the remaining letters are lowercase. Because it is rule-based rather than a dictionary style guide, short prepositions and acronyms follow the same first-letter rule.
Choose another tool for your next calculation, conversion, or text task.