ai-text-watermark-scanner
v0.1.5
Published
Dependency-free local scanner for hidden Unicode and removable text artifacts, with transparent code-point reporting.
Maintainers
Readme
AI Text Watermark Scanner
Inspect and clean literal hidden text artifacts without rewriting the visible words.
Want the browser extension?
Use AI Text Watermark Remover for Chrome to clean supported hidden artifacts when copying AI replies or highlighted text. The extension runs locally and keeps the copy workflow simple.
- Install the Chrome extension
- See supported AI sites and browser compatibility
- Use the full web scanner and batch tools
This repository contains the open-source scanning engine, CLI, fixtures, SARIF integration, and developer examples. The browser extension is a separate product with its own release version.

Open the demonstration GIF directly
A dependency-free, local-first JavaScript scanner for literal hidden Unicode and removable formatting artifacts. It reports exact code points and locations, creates a conservative cleaned copy, and makes no authorship claim.
Why this exists
Copied AI text can contain zero-width characters, directional controls, unusual spaces, or formatting artifacts. A generative rewrite can change meaning. This package takes the deterministic route: identify the exact character, show its location, and remove only supported literal artifacts.
It is intentionally separate from statistical model watermark detection. Provider-level signals require an official supported verifier.
What you get
- Exact Unicode code points and source locations
- Conservative cleaning with readable wording preserved
- Dependency-free JavaScript and TypeScript types
- CLI output for local files
- SARIF 2.1.0 export for CI and GitHub Code Scanning
- Public fixtures shared with the hosted scanner and browser tools
- No text upload, telemetry, or authorship accusation
Install
npm install ai-text-watermark-scannerJavaScript
import { scanText } from "ai-text-watermark-scanner";
const result = scanText("copied text");
console.log(result.findings);
console.log(result.cleanedText);CLI
ai-watermark-scan draft.txtExport SARIF 2.1.0 for GitHub Code Scanning or another CI system:
ai-watermark-scan draft.txt --sarif > ai-text-watermark-results.sarifScan a directory into one SARIF document with stable automation metadata:
ai-watermark-scan ./content --sarif > ai-text-watermark-results.sarifEach file remains a separate SARIF run so exact locations and partial states are preserved. Unreadable inputs produce an explicit failed invocation and a nonzero exit; they are never silently treated as clean.
SARIF output includes deterministic artifact findings, exact code points, severity, and source locations. It does not claim AI authorship or official model-level watermark detection.
Example result
{
"findings": [
{
"codePoint": "U+200B",
"name": "ZERO WIDTH SPACE",
"index": 6,
"removable": true
}
],
"cleanedText": "Clean text"
}Use it in CI
ai-watermark-scan content.txt --sarif > results.sarifUpload results.sarif to GitHub Code Scanning or another SARIF-compatible system. Findings remain deterministic and reviewable.
Integration examples
Choosing the right tool
| Need | Use | | --- | --- | | Exact hidden-character evidence | This package | | Lossless literal artifact cleaning | This package | | Browser copy workflow | Browser extension | | File and batch reports | Hosted product | | Official provider watermark conclusion | A connected provider verifier | | Stylistic rewriting or humanization | A rewriting tool, with semantic review |
The package does not detect or claim to remove statistical model-level watermarks such as deployed provider token-sampling signals. Use AI Text Watermark Remover for the hosted scanner, reports, batch workflows, browser tools, and current provider guidance.
Public verification
- Literal artifact coverage benchmark
- Downloadable Unicode fixtures
- Browser answer-selection compatibility
- Downloadable provider fixtures
- Hosted and self-hosted API documentation
- Provider capability API
- Provider adapter conformance contract
The hosted product and self-hosted API use the same deterministic literal-artifact rules as this package. Provider-specific model-watermark verification remains separate and is reported only when an official supported verifier is available.
