Skip to main content

AntiWatermark

Local-only AI text watermark remover, steganography stripper, and humanizer.

Strips invisible Unicode markers, replaces AI clichés, validates output integrity, and optionally rewrites text via a local AI model. No cloud services. No API keys. No data leaves your machine.

🔒 100% Local — No Data Leaves Your Machine


Quick Start

git clone https://github.com/policeakshithreddy/antiwatermark
cd antiwatermark

python -m venv .venv
source .venv/bin/activate

pip install -e .

pytest

python app.py

Open http://localhost:8000

This works without any AI model. Fast Mode is always available.


Two Modes

Fast Clean (Default)

Deterministic, instant, zero dependencies.

  • Strips 26+ invisible Unicode characters (zero-width spaces, BOM, soft hyphens, etc.)
  • Replaces 30+ AI clichés ("delve into", "rich tapestry", "multifaceted", "Certainly!")
  • Protects code blocks, inline code, LaTeX, URLs, Markdown links, and emails
  • Validates output integrity
  • Runs heuristic diagnostics

Local Neural (Optional)

Uses a local AI model via Ollama for deeper text rewriting.

# Install Ollama (https://ollama.com)
ollama pull llama3.2
ollama serve

# Then select "Local Neural" in the UI

No cloud APIs. No API keys. Ollama runs entirely on your machine.


Installation

Base (Fast Mode only):

pip install -e .

With neural support:

pip install -e ".[neural]"

Usage

Web UI

python app.py
# Open http://localhost:8000

CLI

# Clean text
antiwatermark "Your AI-generated text here"

# Clean a file in-place
antiwatermark document.txt --inplace

# Output diagnostics as JSON
antiwatermark "text" --json

# Use Ollama backend
antiwatermark "text" --backend ollama

# Launch Web UI
antiwatermark --web

# Run clipboard daemon
antiwatermark --daemon

Python API

from antiwatermark import clean_text, validate_output, ImmunityShield

# Fast clean
cleaned, diagnostics = clean_text("Your AI text here")
print(cleaned)
print(f"Human confidence: {diagnostics['human_confidence_pct']}%")

# With validation
shield = ImmunityShield()
shield.shield(original_text)
result = validate_output(original_text, processed_text, shield)
if result.is_valid:
    print("Output validated successfully")
else:
    print(f"Validation failed: {result.failures}")

REST API

# Health check
curl http://localhost:8000/api/health

# Fast clean
curl -X POST http://localhost:8000/api/clean \
  -H 'Content-Type: application/json' \
  -d '{"text": "Your text here"}'

# Neural rewrite (requires Ollama)
curl -X POST http://localhost:8000/api/rewrite \
  -H 'Content-Type: application/json' \
  -d '{"text": "Your text here", "model": "llama3.2"}'

# Configuration
curl http://localhost:8000/api/config

Chrome Extension

  1. Open chrome://extensions
  2. Enable Developer mode
  3. Click Load unpacked → select the extension/ directory
  4. The extension automatically strips invisible characters when copying
  5. Right-click selected text → AntiWatermarkClean Selection or Rewrite Selection Locally

Project Structure

AntiWatermark/
├── antiwatermark/
│   ├── core.py          # Cleaning, shielding, validation, diagnostics
│   ├── backend.py       # RewriterBackend, BuiltinBackend, OllamaBackend
│   ├── middleware.py     # Rewrite orchestration, domain personas
│   ├── cli.py           # Command-line interface
│   └── __init__.py
├── web/
│   └── index.html       # Self-contained Web UI
├── extension/
│   ├── manifest.json
│   ├── background.js
│   ├── content.js
│   ├── popup.html
│   └── popup.js
├── tests/
│   ├── test_core.py
│   ├── test_backend.py
│   └── test_api.py
├── scripts/
│   └── clipboard_daemon.py
├── app.py               # Local HTTP server
├── pyproject.toml
└── README.md

Testing

pytest

82+ tests covering:

  • Invisible Unicode removal
  • Cleaning idempotency
  • Code/LaTeX/URL/Markdown/email preservation
  • Collision-safe placeholders
  • Validation gates
  • Builtin backend
  • Local-only security policy
  • API endpoints

What AntiWatermark Does

Feature Description
Strip invisible chars Removes 26+ zero-width Unicode characters used for text fingerprinting
Replace AI clichés Deterministically replaces 30+ common AI writing patterns
Protect structured content Shields code blocks, LaTeX, URLs, links, and emails from modification
Validate output 5-gate validation ensures protected content is preserved
Heuristic diagnostics Analyzes text patterns, burstiness, and AI marker density
Local neural rewrite Optional deeper rewriting via local Ollama models

What AntiWatermark Does NOT Do

  • ❌ No cloud API calls
  • ❌ No data exfiltration
  • ❌ No API keys required
  • ❌ No torch/transformers dependencies
  • ❌ No automatic model downloads
  • ❌ No detector score manipulation claims

Security

All neural communication is restricted to loopback addresses only:

  • 127.0.0.1
  • localhost
  • ::1
  • Any remote host ❌ Rejected

The LocalOnlyPolicy class enforces this at the backend level.


License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

antiwatermark-2.0.0.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

antiwatermark-2.0.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file antiwatermark-2.0.0.tar.gz.

File metadata

  • Download URL: antiwatermark-2.0.0.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.1

File hashes

Hashes for antiwatermark-2.0.0.tar.gz
Algorithm Hash digest
SHA256 4ee0ebade018b5f82d2ee7ee558412d6e5065dd2f212a65b170d89f0b79ae09c
MD5 6522afbd1f594beaf25bd79b458df17a
BLAKE2b-256 b735f545360b746b2034afb5ee76fb71eb4befd8357cf6e1987c415db7af5068

See more details on using hashes here.

File details

Details for the file antiwatermark-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: antiwatermark-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.1

File hashes

Hashes for antiwatermark-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b13e0e7f79fbc59aa6137b16713c361f52124ced4b6c7a7ee00aa362f854a43
MD5 20c35e170704a10df88affaeb1650cfb
BLAKE2b-256 d384698d11b084334a321db7ab42e90143a1c0778509b71088ac95da0f38771e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page