LocalExcelTool
Get started

Text Toolbox

Ten one-click text operations: sort, dedupe, trim, clean and more.

Runs in your browserNo account neededFree

What is Text Toolbox

The Text Toolbox bundles ten everyday text operations into one tool: sort lines, remove duplicates, drop empty lines, trim whitespace, collapse spaces, add numbering and more. Useful for cleaning lists, pre-processing CSVs or tidying copied text. Everything runs locally in your browser.

🔒 Everything runs in your browser. Nothing is uploaded.

What this tool actually does with your file

Where it runs
In your browser, on this page
Upload
None — the file never leaves your device
Offline
Works with the network disconnected

Several operations that are usually needed together

Sorting lines, removing duplicates, trimming each line, removing empty lines, changing line endings and reversing order. They compose in one pass, which is the point: cleaning a pasted list normally means doing four of these in sequence, and each trip through a separate tool introduces its own whitespace bug.

Every operation works on lines as split by CRLF, CR or LF, and the output uses the line ending you select rather than the one detected. That is deliberate — a list pasted out of Windows and sent to a Unix service needs LF regardless of what it arrived with.

Duplicates are not as simple as they look

Exact duplicates are easy. Case-insensitive duplicates need a normalisation step, and near-duplicates need a different tool entirely: a trailing space, a full-width character, or a different Unicode normalisation form makes two visually identical lines compare as different. If deduplication leaves what looks like a duplicate behind, that is what happened.

Sorting is by code unit by default, which puts all uppercase before all lowercase (Z before a) and all accented characters after plain ASCII. That is deterministic but rarely what a reader expects; if the order is going to be visible, sort case-insensitively and then break ties consistently.

The output is a new list, not an edit

Nothing here preserves surrounding formatting — indentation is stripped as part of trimming, and blank lines are either kept or removed wholesale. If the source is code or a structured document, use the specific tool for that format rather than a line-oriented cleaner.

For very long input the work happens in the page, which is fine into the low megabytes and unresponsive beyond. If a list is too large to paste, the operation belongs in a text editor or a shell pipeline, not a browser tab.

How to use it

  1. 1.Paste your text
  2. 2.Choose an operation
  3. 3.Run and copy the result

How Text Toolbox works under the hood

Text tools look trivial until encoding enters the picture. The bytes are unambiguous; the characters they represent are a guess unless the encoding is declared.

  1. 1

    Read bytes, not characters

    The file is read as an ArrayBuffer so the original bytes are preserved, including a byte-order mark if present.

  2. 2

    Decode with a declared or detected encoding

    TextDecoder converts bytes to text. UTF-8 is validated; a BOM is used when present; legacy encodings must be chosen explicitly because guessing between GBK and Shift_JIS is unreliable.

  3. 3

    Transform as a pure function

    Escaping, quoting, case changes and line-ending normalisation are applied to the decoded string, so the same input always gives the same output.

  4. 4

    Encode and download

    The result is encoded back to UTF-8 (or the format's own escaping rules) and returned as a Blob.

  5. Processing pipeline

Why a file looks like mojibake

Mojibake is the same bytes decoded with the wrong table: Shift_JIS read as UTF-8, or GBK read as Latin-1. Nothing is corrupted in the file itself. If the output is garbled, the fix is to re-run with the correct source encoding, not to edit the text by hand — editing bakes the wrong characters in permanently.

CSV quoting is not optional

A CSV field containing a comma, a quote or a newline must be wrapped in double quotes, and inner quotes doubled. Tools that skip this produce files that look fine until someone imports them and the columns shift. This converter applies RFC 4180 quoting on output.

Where text tools stop

There is no reliable way to detect an unknown legacy encoding from content alone, and no way to recover bytes that were already lost. Mixed encodings inside one file cannot be fixed automatically. Very large inputs are capped because regular expressions and repeated string concatenation can take quadratic time.

Verify it yourself

Text is transformed in memory. Nothing is sent while it runs.

  1. 1.Open DevTools on this page and switch to the Network tab
  2. 2.Keep the filter on Fetch/XHR and run the tool
  3. 3.Confirm no request carries your file — you should see only page assets and fonts

Frequently asked questions

Does dedupe keep the original order?

Yes. Duplicate removal keeps the first occurrence and removes later repeats in place.

Is sorting case sensitive?

Sorting uses locale-aware dictionary order, so case differences are handled naturally.

What this kind of conversion cannot keep

Text tools never leave the page: the string you paste is transformed in memory and written back to the result box. There is no request, no log and no retention, which also means there is no way to recover a value you closed the tab on.

More in Text