When copying generated text, documentation, or code snippets from ChatGPT, Claude, or Gemini into a CMS, Notion, Gmail, or code editor, two recurring issues come up for developers and technical writers:
Formatting & Invisible Unicode Artifacts: Raw **bold** asterisks, ### heading hashes, overused AI em-dashes ( — ), broken PDF line wraps, and invisible zero-width characters ( U+200B , U+FEFF , U+00A0 ) that silently break string matching, regex validation, and character limits.
Context Window & Token Estimation: Knowing how many Byte-Pair Encoding (BPE) tokens a long prompt, JSON payload, or multi-language document consumes before sending it to GPT-4o (128K), Claude 3.5 Sonnet (200K), or Gemini 1.5 Pro (1M)—without uploading confidential text to a third-party server.
To solve both problems with zero server round-trips, I built two new 100% client-side utilities as part of TextScope .
1.…