UTILITIES NEWBIE

Digital tools

Text counter and list cleanup

Count the original text or clean a line-based list. Every comparison and whitespace choice is explicit; your source remains unchanged.

Input

Lowercase comparison uses Unicode toLowerCase, not full Unicode case folding or locale collation.

Trim uses JavaScript Unicode whitespace rules. It does not normalize internal whitespace.

Maximum 100,000 UTF-16 characters and 10,000 logical lines. Counts use the original text; cleanup options affect list operations only.

Output

Ready. Nothing is saved automatically.

Keep the first matching line. Full explanation follows.
Trim outer spaces. Text explanation

With trim, case-sensitive deduplication and empty removal selected, the first normalized apple is retained and the later duplicate removed. Pear remains after it. The checked output retains a terminal LF; internal whitespace and application identity rules are separate concerns.

Clean a line list while retaining the decisions that changed it

Choose counting, comparison or transformation deliberately

This workspace can count submitted text, remove duplicate lines, sort lines and provide the offered case or extra-space transformations. These are different operations. Start by deciding whether you need a report about the original text or an edited list. Counting does not apply the list-cleanup options to the text before measuring it. Sorting and deduplication can use selected trimming, case-comparison and empty-line options. Keep the original before processing, because a smaller output is not automatically a more accurate representation of the data you intended to keep.

A common task is preparing a small synthetic list of labels copied from several notes. Spaces and capitalization can be meaningful, so do not automatically treat visually similar lines as identical. The comparison mode can be case-sensitive or use locale-independent lowercase forms. The latter is not full Unicode case folding or a language-specific collation rule. Decide which equivalence relation the task actually needs. If labels are identifiers in another system, use that system's rules rather than assuming a generic cleanup setting defines which values are interchangeable.

Line boundaries also matter. The processor recognizes CRLF as one break and accepts LF or CR breaks; Unicode line and paragraph separators remain text under this profile. A terminal line break does not create an extra empty logical line. Empty input has zero lines. The editor or import path can have its own newline handling before text reaches the processor, so counts should be interpreted for the submitted string, not as a forensic byte count of an unseen original file. Preserve raw source elsewhere when that distinction is material to a comparison.

Follow first-kept deduplication through a short list

Checked synthetic input

Operation: deduplicate
Line whitespace: trim
Comparison: sensitive
Drop empty: true
Source (LF):
  apple 
apple
Pear

Exact observed output

apple
Pear

The worked list contains an apple line with outer spaces, another apple line and Pear, with a terminal line break. Choose deduplication, trim each line, case-sensitive comparison and empty-line removal. The checked output keeps apple followed by Pear and a terminal LF. The first normalized matching line is retained in original order; the second apple is removed. The example settings block describes the controls and source to use. It is not a separate executable template or an input-file format that this page imports automatically.

Trimming removes leading and trailing whitespace per line using the supported JavaScript whitespace rules. It does not collapse internal spacing. Empty-line removal takes place after optional trimming, so a whitespace-only line can become empty and then be removed when both options are selected. Those choices are deliberate transformations and should be recorded with the result. If an outer space distinguishes two valid identifiers in the target system, trimming may be inappropriate. Do not call the shorter result correct simply because it contains fewer visually redundant entries.

Sorting is different from deduplication. In a checked case, numeric-looking lines sort in Unicode code-point order rather than numeric magnitude: 10 precedes 2. Equal lowercase comparison keys retain their original relative order, and sorting does not automatically remove duplicates. Use a numeric or locale-aware sorting tool when that is the actual requirement. A list arranged differently from a spreadsheet's default sort is not necessarily a defect here; it may reflect the explicitly different comparison model. Keep both the selected operation and its options beside any expected output.

Interpret counts and Unicode limits accurately

The input ceiling is 100,000 UTF-16 code units and 10,000 logical lines, with generated output capped at 1,000,000 UTF-16 units. A visible symbol is not necessarily one code unit or one UTF-8 byte. The count report distinguishes code units, Unicode code points, grapheme clusters, UTF-8 bytes, logical lines, breaks and whether a terminal break exists. Grapheme segmentation depends on the browser's Unicode implementation and is reported as unavailable if the needed support is absent. It is not a word count, a reading-level score or an automatic measure of useful editorial content.

A checked short specimen containing A, an emoji and an LF has different counts for code units, code points and bytes. The corresponding CRLF processor specimen differs again in its original newline representation. Do not conflate those measurements or assume a screenshot preserves the underlying line-ending bytes. The browser test uses an explicit LF specimen, while raw processor cases document CRLF separately. If an import or paste path normalizes the text before submission, a later count describes that submitted representation. Record the stage instead of treating different counts as proof that characters vanished inside the cleanup algorithm.

Lowercase comparison does not normalize every visually equivalent Unicode spelling. It also is not full case folding: a checked sharp-s and SS pair remains distinct under the lowercase comparison used here. Original spelling is retained unless a transformation option changes it. The separate case-conversion controls do change text and should not be confused with comparison-only mode. Do not use this tool as an authority for identity matching, internationalized search or a database's uniqueness policy without verifying the actual rules those systems apply.

Make a cleanup decision reproducible

For a list handoff, retain the raw submitted text, operation and every comparison option alongside the generated output. Include a deliberate duplicate, a whitespace edge and a terminal-break case when those features matter. That gives another reviewer enough information to reproduce what was removed or retained. Copy and Download transfer generated text, not an in-place edit to your original list or proof that another application interpreted it identically. The source is not replaced automatically, so use that separation to review the result before adopting it.

For a counting discrepancy, identify whether the two measurements refer to raw file bytes, an editor's current value, code points or user-perceived grapheme clusters. Those can legitimately differ. Use a tiny synthetic specimen to isolate the boundary, then check the same stage in both systems. A count report should not be relabeled as a guarantee about every language or Unicode version. If exact archival bytes matter, compare the original byte source through an appropriate file workflow rather than asking a text-editor surface to reconstruct information it may already have normalized.

For sorting and deduplication, state what makes two entries equivalent and what order is intended. Review meaningful differences rather than deleting them to reach a tidy appearance. The accessible diagram explains first-kept behavior and the selected whitespace decisions, while the exact example shows the delivered LF result. The useful endpoint is a deliberate, auditable transformation of a bounded list. Domain identity rules, linguistic ordering, preservation of an unseen original file and publication decisions remain separate questions that this tool cannot infer for you.

Supporting reference: Unicode segmentation context; browser implementation and local line rules qualified.

Worked examples

Input and settings

Apple
apple
Banana
Apple

Operation: Remove duplicate lines
Comparison: lowercase forms

Expected output

Apple
Banana

The first spelling wins. Apple and apple compare equal after lowercasing, so the original first Apple is retained. The input terminal newline is preserved in cleanup output.

Related tools

Unix timestamp and UTC date calculator · Descriptive statistics calculator · Color converter and contrast checker · Dummy JSON and CSV test-data generator

Find a tool

Type a tool name, such as JSON or percentage.

Quick links

Browse by category

All tools