How to Remove Claude Watermarks from Text, Code, and Files
Claude now marks AI-generated content. But it does not mark everything the same way. Anthropic currently uses embedded watermarks for text and signed C2PA provenance metadata for supported files. Code sits somewhere in between: it is still text, but its structure gives the watermark fewer places to work. I went into detail about Claude’s watermarks […] The post How to Remove Claude Watermarks from Text, Code, and Files appeared first on Analytics Vidhya.
--> How to Remove Claude Watermarks from Text, Code and Files India's Most Futuristic AI Conference Is Back – Bigger, Sharper, Bolder d : h : m : s Career GenAI Prompt Engg ChatGPT LLM Langchain RAG AI Agents Machine Learning Deep Learning GenAI Tools LLMOps Python NLP SQL AIML Projects Reading list How to Become a Data Analyst in 2025: A Complete RoadMap A Comprehensive Learning Path to Tableau in 2025 A Comprehensive NLP Learning Path 2025 Learning Path to Become a Data Scientist in 2025 Step-by-Step Roadmap to Become a Data Engineer in 2025 A Comprehensive MLOps Learning Path: 2025 Edition Roadmap to Become an AI Engineer in 2025 A Comprehensive Learning Path to Master Computer Vision in 2025 Best Roadmap to Learn Generative AI in 2025 GenAI Roadmap for Enterprises Large Language Models Demystified: A Beginner’s Roadmap Learning Path to Become a Prompt Engineering Specialist How to Remove Claude Watermarks from Text, Code, and Files Vasu Deo Sankrityayan Last Updated : 19 Aug, 2026 6 min read Claude now marks AI-generated content. But it does not mark everything the same way. Anthropic currently uses embedded watermarks for text and signed C2PA provenance metadata for supported files. Code sits somewhere in between: it is still text, but its structure gives the watermark fewer places to work. I went into detail about Claude’s watermarks in my article how Claude’s watermarking works, and here I’d answer the obvious question: How do you remove the watermark? You’ll soon find out the watermark isn’t hard to remove at all. Table of contents Remove Claude Watermark from Text Remove Claude Watermark from Code Remove Claude Watermarks from Files What About PDFs and Other Files? Can You Remove the Mark Completely? The Practical Solution Frequently Asked Questions Remove Claude Watermark from Text This is the hardest case. At least on paper, because: In fact, Claude does not add a hidden character that you can search for and delete. Anthropic says its watermark is based on SynthID-Text. This is the text variant of the traditional SynthID that is used by Gemini models for watermarking. Furthermore, the model changes the source of randomness it uses when choosing between possible words. Across a sufficiently long passage, those choices create a statistical pattern that can be detected later. For example, Click here to view the functionality of SynthID-Text LLM probabilities and random watermarking functions Tournament sampling: over-generation with watermark-based iterative selection Think about these three sentences: The compiler rejected the patch. The patch was rejected by the compiler. The compiler wouldn’t accept the patch. They’re essentially relaying the same information, although in a different manner (wording wise). This minor change would barely be detected by a human, but machines can hide patterns using such seemingly safe choices. In addition, a model has some freedom to choose between them. Therefore, that freedom is where a text watermark is placed. It’s all in the patterns… Rewrite, don’t “strip” However, there is no metadata-cleaning operation for Claude’s text watermark. Since the watermark is a pattern that is distributed across text: Edits wouldn’t be sufficient Copying the text to another editor does not solve it What does work then? A substantial rewrite or paraphrase Rewriting the text is the ideal choice for countering watermarks. But if you’re not interested in an overhaul, paraphrasing would suffice. Similarly, this is important because there are a lot of paraphrasing tools freely available online: That gives us a simple rule: Nevertheless, changing the file does not remove a text watermark. Changing the text does. Python approach Since the watermarking is in Claude’s writing, redoing the text in other LLMs (which don’t have SynthID-Text) would reduce the watermarks. The following code uses a generic OpenAI-compatible endpoint. Using a model other than Claude for the rewrite: import os from openai import OpenAI def rewrite_text(text: str) -> str: client = OpenAI(api_key=os.environ["OPENAI_API_KEY"]) prompt = f""" Rewrite the following text completely in new wording. Rules: - Preserve the facts and meaning. - Preserve technical accuracy. - Change sentence structure throughout. - Do not merely replace a few words with synonyms. - Rebuild paragraphs where useful. - Return only the rewritten text. TEXT: {text} """ response = client.responses.create( model=os.getenv("REWRITE_MODEL", "gpt-5"), input=prompt, ) return response.output_text if name == "main": original = open("input.txt", "r", encoding="utf-8").read() rewritten = rewrite_text(original) with open("output.txt", "w", encoding="utf-8") as f: f.write(rewritten) This would reduce the watermarks. Removal isn’t guaranteed unless we plug in a detector to confirm the output watermark percentage. But this should suffice as a starter code. Remove Claude Watermark from Code Code is more interesting. Meanwhile, Anthropic does not describe a separate “code watermark.” Generated code falls under the text watermarking system. But code contains far fewer arbitrary choices than normal prose. This is because programs must follow a definite syntax. For example: for i in range(len(users)): process(users[i]) could legally become: for index in range(len(users)): process(users[index]) The program behaves the same. A variable name can change. A comment can change. Formatting can change. But you cannot arbitrarily change a required Python keyword or API call without potentially breaking the program. That is why watermarking is naturally weaker in code. A Python AST rewrite For Python code specifically, we can make substantial source-level changes while preserving the program’s structure. The script below: renames local identifiers, removes comments, removes standalone docstrings, reconstructs the source using Python’s AST. import ast import keyword import random import string from pathlib import Path class IdentifierRenamer(ast.NodeTransformer): def init(self, seed: int = 42): self.rng = random.Random(seed) self.mapping = {} def _new_name(self, old_name: str) -> str: if old_name in self.mapping: return self.mapping[old_name] prefix = random.choice(["tmp", "value", "item", "obj", "data"]) suffix = "".join( self.rng.choice(string.ascii_lowercase) for _ in range(5) ) candidate = f"{prefix}_{suffix}" while keyword.iskeyword(candidate): suffix = "".join( self.rng.choice(string.ascii_lowercase) for _ in range(6) ) candidate = f"{prefix}_{suffix}" self.mapping[old_name] = candidate return candidate def visit_Name(self, node): node.id = self._new_name(node.id) return self.generic_visit(node) def visit_arg(self, node): node.arg = self._new_name(node.arg) return self.generic_visit(node) def visit_alias(self, node): if node.asname: node.asname = self._new_name(node.asname) return self.generic_visit(node) def remove_docstrings(tree: ast.AST) -> None: for node in ast.walk(tree): if not isinstance(node, (ast.Module, ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef)): continue if not node.body: continue first = node.body[0] if ( isinstance(first, ast.Expr) and isinstance(first.value, ast.Constant) and isinstance(first.value.value, str) ): node.body.pop(0) def rewrite_python(source: str) -> str: tree = ast.parse(source) remove_docstrings(tree) transformer = IdentifierRenamer() tree = transformer.visit(tree) ast.fix_missing_locations(tree) return ast.unparse(tree) def rewrite_file(input_path: str, output_path: str) -> None: source = Path(input_path).read_text(encoding="utf-8") rewritten = rewrite_python(source) Path(output_path).write_text( rewritten, encoding="utf-8", ) if name == "main": rewrite_file( "input.py", "rewritten.py", ) This is intentionally a source transformation, not a watermark decoder. Finally, it changes substantially more of the generated surface than simply replacing one variable name. And there is an important caveat: AST reconstruction can change formatting and some source-level details. Test the resulting program before using it. The same logic applies to comments. They have much more linguistic freedom than executable syntax, so they provide more opportunities for statistical marking. Remove Claude Watermarks from Files Files are theeasiest to remove watermarkfrom. Anthropic does not hide a watermark inside the pixels of supported images. Instead, Claude attaches a cryptographically signed C2PA content credential to supported file types such as .png, .jpg, and .svg. The credential lives in the file metadata and records that Claude processed the asset. This is an important distinction. The image itself can remain unchanged. The provenance record sits alongside it as the metadata (header specifically) of the file. That also means creating a new derivative file can break the link to the original manifest. Anthropic explicitly lists format conversion, re-saving, screenshots, and similar operations as ways metadata may be stripped. Use Python to inspect the file The official C2PA Python library can read and validate manifests from supported media files. Install the library using: pip install c2pa-python Then use the following code: import json from c2pa import Context, Reader def inspect_c2pa(path: str) -> dict | None: try: with Context() as context: with Reader(path, context=context) as reader: data = reader.json() return json.loads(data) except Exception as exc: print(f"No readable C2PA manifest: {exc}") return None if name == "main": manifest = inspect_c2pa("image.png") if manifest: print(json.dumps(manifest, indent=2)) This answers the first question: Does this file contain a C2PA manifest? Do not strip metadata blindly. Check first. What About PDFs and Other Files? This is where you should be careful with broad claims. Anthropic says provenance metadata applies where Claude supports processing files. Its current documentation explicitly gives .svg, .png, and .jpg as examples. It also says some platforms or features may not support every marking type. So don’t write: “Every Claude PDF has a watermark.” That isn’t what Anthropic documents. The Python C2PA library is useful here too because it can read supported media files rather than relying on assumptions. Can You Remove the Mark Completely? Let’s face the bottom-line: Text A complete rewrite can fully remove the original Claude watermark. Light editing may not. Difficulty: Moderate Recommended Tool: Quillbot paraphrases your text for free. Code Code behaves like text, but its watermark is generally weaker because there are fewer reasonable choices. Significant source transformation can change the original statistical pattern, but there is no official Claude code-watermark removal API. Difficulty: Hard Files A C2PA credential is metadata. Creating a new derivative file can leave the original manifest behind. Anthropic explicitly lists format conversion, re-saving, and screenshots among operations that can strip file metadata. Difficulty: Easy The Practical Solution The three cases are fundamentally different: TypeWhat Claude addsCounter TextStatistical watermarkSubstantial rewrite CodeSame text mechanism, but weakerMeaningful source transformation FilesSigned C2PA provenanceCreate and verify a new derivative Just follow the steps outlined in this article to deal with the Claude watermark issue going forward. Frequently Asked Questions Q1. Can I remove a text watermark by copying it to a new editor? A. No, copying text does not remove the watermark because the statistical pattern is embedded within the writing itself, not the file format. Q2. Why is it easier to remove watermarks from code than prose? A. Code has strict syntax requirements, leaving fewer opportunities for the model to make the arbitrary word choices th [truncated for AI cost control]