Text Tools

Words, precision
and power.

The details behind text processing, encoding, and document formats.

✦ 108 Articles ✦ Updated Weekly ✦ Free to Read
✦ AI

✦ AI-powered — understands natural language

Find & Replace Sep 11, 2026 Latest ✦

Word Boundaries and Lookarounds: Precise Find & Replace

Replacing "id" also hits valid, hidden and width. Word boundaries, lookarounds and lazy quantifiers are the three patterns that make find-and-replace precise.

Read article
Character Frequency Sep 3, 2026

Finding Invisible Characters: Debugging Encoding With Counts

Zero-width spaces, byte order marks, smart quotes and mojibake are invisible on screen and obvious in a character count. Here's how to find and fix them.

Case Converter Aug 31, 2026

Why ALL CAPS Is Harder to Read Than You Think

All-caps text is slower to read, breaks screen reader pronunciation, and reads as shouting. Here's the typography behind why, and when capitals are still the right choice.

Word & Character Counter Aug 10, 2026

Why Your Reading Time Estimate Is Wrong — Reading Speed Research, Word Count Inconsistency, and Character Limits That Actually Matter

The "238 wpm average reading speed" is a median for typical adult prose — the same reader might halve their speed on technical documentation with unfamiliar terminology, and skimming reaches 450-700 wpm with substantially lower comprehension. Here's why domain expertise speeds up reading of specialist content, why the same essay shows different word counts in different tools (hyphenated compounds, URL handling), the LLM token-to-word ratio that matters for API cost estimation, and why Flesch-Kincaid scores miss vocabulary familiarity and conceptual complexity entirely.

Whitespace Cleaner Aug 3, 2026

Zero-Width Characters Are Used to Watermark Leaked Documents and Bypass Spam Filters — Here's the Full Invisible Unicode Taxonomy

Zero-width spaces and zero-width non-joiners are used to watermark confidential documents — each recipient gets a unique binary pattern embedded invisibly, allowing leaks to be traced back to the specific recipient. Here's the full taxonomy of invisible Unicode characters (U+200B zero-width space, U+00A0 non-breaking space, directional controls), why Python's str.strip() doesn't remove non-breaking spaces, and how invisible characters are used to bypass content filters by breaking exact-match pattern recognition.

Text to Slug Aug 2, 2026

Hierarchical vs Flat URL Structure, Taxonomy Collisions, and Multilingual Slug Design — The Slug Decisions That Last Forever

Slug architecture for content series, taxonomies, and multilingual sites involves permanent commitments — a slug embedded in inbound links can never be silently changed. Here's the hierarchical vs flat URL structure trade-off (hierarchy embeds category in URL, making recategorisation cost real), how category/tag slug collisions form when the same term appears in both taxonomies, author slug edge cases at scale (departures, pen names, duplicates), and why path-prefix multilingual URL structure beats subdomains for authority consolidation.

Text Truncator Aug 1, 2026

CSS text-overflow: ellipsis Doesn't Remove Text — The Four Truncation Layers and MySQL's Silent Data Loss Bug

CSS text-overflow: ellipsis hides text from view but leaves it in the DOM — search engines index it, screen readers may announce it, and Find in Page finds it. That's correct for display truncation but completely wrong for data-level truncation. Here's the four truncation layers (CSS, JavaScript, API, database) and when each is correct, MySQL's silent truncation that discards characters without error in default mode, and why meta description truncation should use word boundaries rather than character counts.

Text Reverser Jul 29, 2026

Reversing Text Is Harder Than It Looks — Unicode Bidirectional Algorithm, Grapheme Clusters, and the Trojan Source Attack

Reversing Arabic text character-by-character produces nonsensical output — Arabic is stored in logical reading order and reversed by a rendering engine, so reversing code points produces different words backward, not mirrored text. Here's how Unicode's bidirectional algorithm assigns direction to each character, why emoji sequences need grapheme cluster reversal rather than code-point reversal, and how the Trojan Source vulnerability exploited RLO (Right-to-Left Override) control characters to hide malicious code in source file reviews.

Text Diff Jul 28, 2026

Why Git Diff Shows the Same Change Differently Than Other Tools — Myers Algorithm, Patience Diff, and Semantic Diffing

The Myers diff algorithm (used by git diff) finds the minimum edit sequence with fewest edit groups — not just minimum edits — because multiple minimum-edit solutions exist and some are far more readable than others. Here's why patience diff wins for code by anchoring on unique lines first, how AST-based semantic diffing represents a renamed variable as one change instead of N lines, and why diff3 merge conflict markers (showing the common ancestor alongside both conflicting versions) make conflicts easier to resolve.

String Repeater Jul 26, 2026

Why `"abc" is "abc"` Is True But `"hello world" is "hello world"` Might Not Be — String Interning, Ropes, and Concatenation Complexity

String interning stores only one copy of each distinct string and reuses references — which is why Python's `"abc" is "abc"` can be True while `"hello world" is "hello world"` may be False. Here's V8's internal ConsString lazy concatenation representation, why `result += "abc"` in a million-iteration loop is O(n²) while `"abc" * 1000000` is O(n), how rope data structures make text editor string operations efficient, and why using a repeated string to test a VARCHAR column reveals silent truncation bugs.

Sort Lines Jul 25, 2026

Why Quicksort Fails When Data Doesn't Fit in RAM — External Merge Sort, Timsort, and Database Sort Optimisation

When data exceeds RAM, the bottleneck shifts from CPU comparisons to disk I/O — and quicksort's cache-friendly random access pattern becomes a liability while merge sort's sequential access pattern becomes an asset. Here's external merge sort's two-phase approach, why Timsort sorts nearly-sorted real-world data in close to O(n), how database query planners use B-tree index order to avoid explicit sort steps, and why `LC_ALL=C sort` produces different output than locale-aware sort on the same data.

Remove Duplicate Lines Jul 21, 2026

PCR Duplicates, Git's Content Hashing, and Cross-Language Plagiarism — How "Duplicate" Means Something Different in Every Technical Domain

PCR duplicates in DNA sequencing aren't defined by identical sequence text — they're defined by identical mapping position, because sequencing errors mean true duplicates may differ by a single base. Here's how Git's content-addressable storage deduplicates by exact SHA hash, why CMS media libraries need perceptual hashing to catch visually-identical-but-byte-different logo uploads, and why cross-lingual plagiarism detection requires semantic embeddings rather than text matching.

ROT13 Encoder Jul 19, 2026

The 300-Year Unbreakable Cipher That Got Broken — Vigenère, Enigma, and What Every "Unbreakable" Cipher Has in Common

The Vigenère cipher was unbreakable for 300 years — until the Kasiski test revealed that repeated keywords create periodic patterns detectable by measuring distances between repeated ciphertext sequences. Enigma failed not through mathematical weakness but through operator protocol flaws (predictable message formats, the reflector's no-self-encryption constraint). The one-time pad is provably unbreakable but impractical. Here's what each historical failure teaches about what "secure" actually means.