Text Tools

Count / Diff / Dedupe / Case · 10 tools

Text tools exist because the same string can be correct in one context and broken in another: invisible characters, mixed line endings, duplicate lines, four different definitions of "character count". These tools make the invisible visible and the inconsistent consistent.

Most of them are line-oriented — they split on newline, transform each line, and join again. That is the right model for logs, lists, CSV columns and config files, and the wrong model for prose. The regex tester is the exception: it works on the whole input and shows every match with group captures.

Which one do I need?

All tools in this category

Word & Character Counter Count characters, Chinese/English, lines, paragraphs, UTF-8 bytes and estimated reading time Text Diff Checker Find added and removed lines between two versions, side by side Line Dedupe & Sort Remove blank lines and duplicate lines, optionally sort alphabetically Case Converter Convert between UPPERCASE, lowercase, capitalize first, title case and sentence case Naming Style ConverterNEW Convert among camel / Pascal / snake / kebab / CONSTANT styles in one click Line Processing Batch add prefix/suffix and line numbers; remove or keep lines containing keywords Find & Replace Support plain text and regex, optional case-insensitive, replace everywhere Regex TesterHOT Highlight matches in real time, show capture groups, with g/i/m toggles HTML Entity Encoder / Decoder Convert between special characters and & < and other HTML entities Whitespace Cleaner Trim ends, collapse spaces, remove all whitespace, remove tabs, convert CRLF/LF

Guides in this category

FAQ

Why do I get four different character counts?

They measure different things. UTF-16 code units are what JavaScript string length returns, so an emoji outside the BMP counts as 2. Code points count Unicode scalar values. UTF-8 bytes matter for storage limits and database columns. Grapheme clusters count what a human perceives as one character, including combining marks and emoji sequences.

Why should I not parse HTML with a regular expression?

HTML is not a regular language. Optional closing tags, nested identical elements and attribute quoting rules all break patterns that look correct on the sample you tested. Use a parser and query the DOM. Regular expressions are fine for flattening, extracting a known field, or quick triage — not for correctness.

Should I validate an email address with a regular expression?

Not strictly. The full grammar allows quoted local parts and comments, so a pattern that accepts every valid address is unreadable and still not future-proof; a pattern that is readable rejects valid addresses. Check for an @ and a dot as a UX hint, then send a confirmation mail — that is the only real verification.