Skip to main content

Text Case & Cleanup

Convert text case and remove duplicate lines

Input and options stay in this tab's session and are not sent to a server.

Input Text(0 characters, 0 words)

Maximum input: 1,000,000 UTF-16 code units.

Result

Was this Text Case & Cleanup helpful?

Help us keep tools reliable, fast, and bug-free.

What you can do with Text Case & Cleanup

  • Remove duplicate lines
  • Change text to uppercase

How this text processing works

Convert text to uppercase, lowercase, title case, camelCase, snake_case, or kebab-case, and optionally remove duplicate lines.

Example input

private browser tools for developers

Example output

Private Browser Tools For Developers

Practical workflow

  1. Paste or type text into the input editor and review its live character and word counts.
  2. Choose No Change, UPPERCASE, lowercase, Title Case, camelCase, snake_case, or kebab-case.
  3. Optionally select Remove duplicate lines to keep the first copy of each exact line.
  4. Select Process Text, review the result and its counts, then copy it if it meets your needs.

Common use cases

  • Converting identifiers between camelCase, snake_case, and kebab-case before using them in code.
  • Applying consistent uppercase, lowercase, or title case to copied labels and headings.
  • Removing repeated exact lines from pasted lists while preserving their original order.

Important notes and limitations

  • The selector offers six transformations plus No Change: uppercase, lowercase, title case, camelCase, snake_case, and kebab-case. It does not calculate sentence counts or reading time.
  • Duplicate removal matches whole lines exactly, including case and whitespace, and preserves the first occurrence order.
  • camelCase, snake_case, and kebab-case keep Unicode letters and numbers but remove punctuation, separators, and line breaks while joining words.
  • Input and options are kept in this tab's session storage and are not sent to a server. Previously saved local storage values are neither read nor removed.
  • Text input and processed output are limited to 1,000,000 UTF-16 code units to keep synchronous browser processing bounded.

Linux coreutils text transformation commands

Count lines, words, and characters with wc

wc -l -w -m document.txt

Calculates line count (-l), word count (-w), and multibyte character count (-m) via POSIX coreutils.

Sort and deduplicate lines with sort and uniq

sort input.txt | uniq -c | sort -nr

Sorts lines alphabetically, aggregates occurrence counts, and outputs sorted by descending frequency.

Line endings & Unicode character counting

CRLF (\r\n) vs LF (\n) line ending discrepancies

Cause: Windows text files introduce carriage return '\r' characters, causing inflated byte lengths and regex failures.

Solution: Normalize line endings to UNIX LF using 'dos2unix file.txt' or '.replace(/\r\n/g, '\n')' in code.

Emoji & surrogate pair counting inaccuracies

Cause: Standard '.length' in JavaScript counts UTF-16 code units, counting complex emojis as 2 to 7 characters.

Solution: Use Intl.Segmenter or spread operator ('[...text].length') to count true user-perceived grapheme clusters.

Continue your workflow

Frequently asked questions

Which text case options can I select?

Choose No Change, UPPERCASE, lowercase, Title Case, camelCase, snake_case, or kebab-case.

How does duplicate-line removal decide which lines to keep?

It removes exact repeated lines, including case and whitespace differences, and keeps the first occurrence in its original position.

Does case conversion preserve punctuation and line breaks?

Uppercase, lowercase, and Title Case keep the input separators. camelCase, snake_case, and kebab-case keep Unicode letters and numbers, remove punctuation and separators, and join the words into one result.