Skip to content
 
 

Repository files navigation

AI Text Watermark Scanner

npm version tests license

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.

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.

Four-step demonstration of local hidden artifact inspection and cleaning

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-scanner

JavaScript

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.txt

Export SARIF 2.1.0 for GitHub Code Scanning or another CI system:

ai-watermark-scan draft.txt --sarif > ai-text-watermark-results.sarif

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.sarif

Upload 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

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.

About

Transparent local scanner for hidden Unicode and removable AI text artifacts

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages