<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/text-watermarking-in-python-catch-whoever-copies-your-writing-anb3npp5z" -->

---
title: Text Watermarking in Python: Catch Whoever Copies Your...
description: A practical, experiment-backed guide to watermarking plain text, covering three families of techniques: invisible zero-width characters, keyed synonym...
canonical: https://daily.dev/posts/text-watermarking-in-python-catch-whoever-copies-your-writing-anb3npp5z
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Text Watermarking in Python: Catch Whoever Copies Your Writing | daily.dev
og:description: A practical, experiment-backed guide to watermarking plain text, covering three families of techniques: invisible zero-width characters, keyed synonym...
og:url: https://daily.dev/posts/text-watermarking-in-python-catch-whoever-copies-your-writing-anb3npp5z
og:image: https://api.daily.dev/og/posts/ANb3nPP5Z.png
og:image:alt: Text Watermarking in Python: Catch Whoever Copies Your Writing
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Text Watermarking in Python: Catch Whoever Copies Your Writing

**[Towards Data Science](https://daily.dev/sources/tds)** · 25 min read · 0 upvotes · 0 comments

## Summary

A practical, experiment-backed guide to watermarking plain text, covering three families of techniques: invisible zero-width characters, keyed synonym substitutions, and meaning-level (semantic) marks via embeddings, plus generative watermarking done at token-generation time (Kirchenbauer green-list and DeepMind's SynthID-Text). Tests run on Gemma-2-9b-it and Qwen2.5-7B-Instruct measure survival rates across 12 channels including copy-paste, HTML/JSON round-trips, sentence deletion, word replacement, translation, and full paraphrasing. Zero-width marks survive mechanical transformations perfectly but die instantly under LLM rewriting; keyed word choices survive light edits but degrade text quality; semantic watermarks (PostMark-style) hold up best under paraphrasing at higher insertion rates but hurt fluency; generative watermarking works well on long open-ended text but fails on short, factual, or paraphrased output. The piece closes with a practical decision table matching watermark type to threat model, plus a link to a reproducible toolkit.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://towardsdatascience.com/text-watermarking-in-python-catch-whoever-copies-your-writing>

## Questions this post answers

### How well do zero-width character watermarks survive text being copied or converted between formats?

Zero-width character watermarks (using characters like U+200B and U+200C) survived 150 out of 150 test cases across mechanical transformations including UTF-8/UTF-16 conversion, JSON and HTML round trips, Markdown, .docx, whitespace normalization, and Unicode NFKC normalization. However, explicit sanitization removed them completely (0/150 survived), and LLM-based cleanup dropped survival to just 8% (4/50), falling to 0% under full paraphrasing.

_Developers building provenance or anti-scraping safeguards can track watermarking research and tool releases on daily.dev._

### Does SynthID-Text detect AI-generated text better than Kirchenbauer green-list watermarking?

Yes, SynthID-Text outperformed Kirchenbauer at every tested length on open-ended prompts, reaching detection rates Kirchenbauer needed twice as many tokens to match—for example, 86.7% vs 53.3% at 100 tokens, and 100% vs 95% at 400 tokens. Both methods, however, dropped sharply after paraphrasing, with SynthID falling to 11.7% and Kirchenbauer to 23.3%, and both hit 0% on factual, low-freedom text.

_Teams evaluating LLM watermarking trade-offs can follow SynthID-Text and Kirchenbauer benchmarks on daily.dev._

### Why did Genius lose its lawsuit against Google despite proving Google copied its lyrics using a watermark?

Genius embedded a watermark by alternating straight and curly apostrophes that spelled REDHANDED in Morse code, and it reportedly appeared in Google's search results for 116 of 301 seeded songs, successfully proving copying occurred. The 2019 lawsuit seeking $50 million was still dismissed in 2020 because Genius did not own the underlying lyrics—it only licensed them, so a watermark proving copying could not substitute for proving ownership.

_Anyone weighing content-attribution strategies can dig into cases like this on daily.dev before relying on watermarking alone._

## Similar posts on daily.dev

- [Text AI watermarks will always be trivial to remove](https://daily.dev/posts/text-ai-watermarks-will-always-be-trivial-to-remove-borbz7x9u) · sean goedecke · 6 upvotes · 4 comments

---

Tags: [#python](https://daily.dev/tags/python), [#llm](https://daily.dev/tags/llm), [#nlp](https://daily.dev/tags/nlp)

[View this post on daily.dev](https://daily.dev/posts/text-watermarking-in-python-catch-whoever-copies-your-writing-anb3npp5z)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Text Watermarking in Python: Catch Whoever Copies Your Writing","url":"https://daily.dev/posts/text-watermarking-in-python-catch-whoever-copies-your-writing-anb3npp5z","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/text-watermarking-in-python-catch-whoever-copies-your-writing-anb3npp5z"},"datePublished":"2026-09-06T14:01:08.942Z","dateModified":"2026-09-14T07:44:51.167Z","description":"A practical, experiment-backed guide to watermarking plain text, covering three families of techniques: invisible zero-width characters, keyed synonym...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7684826e0a825756937eefd8a0219b92?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7684826e0a825756937eefd8a0219b92?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Towards Data Science","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Towards Data Science","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/tds","url":"https://daily.dev/sources/tds"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/text-watermarking-in-python-catch-whoever-copies-your-writing-anb3npp5z","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,llm,nlp","timeRequired":"PT25M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Towards Data Science","item":"https://daily.dev/sources/tds"},{"@type":"ListItem","position":3,"name":"Text Watermarking in Python: Catch Whoever Copies Your Writing"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/text-watermarking-in-python-catch-whoever-copies-your-writing-anb3npp5z#faq","mainEntity":[{"@type":"Question","name":"How well do zero-width character watermarks survive text being copied or converted between formats?","acceptedAnswer":{"@type":"Answer","text":"Zero-width character watermarks (using characters like U+200B and U+200C) survived 150 out of 150 test cases across mechanical transformations including UTF-8/UTF-16 conversion, JSON and HTML round trips, Markdown, .docx, whitespace normalization, and Unicode NFKC normalization. However, explicit sanitization removed them completely (0/150 survived), and LLM-based cleanup dropped survival to just 8% (4/50), falling to 0% under full paraphrasing. Developers building provenance or anti-scraping safeguards can track watermarking research and tool releases on daily.dev."}},{"@type":"Question","name":"Does SynthID-Text detect AI-generated text better than Kirchenbauer green-list watermarking?","acceptedAnswer":{"@type":"Answer","text":"Yes, SynthID-Text outperformed Kirchenbauer at every tested length on open-ended prompts, reaching detection rates Kirchenbauer needed twice as many tokens to match—for example, 86.7% vs 53.3% at 100 tokens, and 100% vs 95% at 400 tokens. Both methods, however, dropped sharply after paraphrasing, with SynthID falling to 11.7% and Kirchenbauer to 23.3%, and both hit 0% on factual, low-freedom text. Teams evaluating LLM watermarking trade-offs can follow SynthID-Text and Kirchenbauer benchmarks on daily.dev."}},{"@type":"Question","name":"Why did Genius lose its lawsuit against Google despite proving Google copied its lyrics using a watermark?","acceptedAnswer":{"@type":"Answer","text":"Genius embedded a watermark by alternating straight and curly apostrophes that spelled REDHANDED in Morse code, and it reportedly appeared in Google's search results for 116 of 301 seeded songs, successfully proving copying occurred. The 2019 lawsuit seeking $50 million was still dismissed in 2020 because Genius did not own the underlying lyrics—it only licensed them, so a watermark proving copying could not substitute for proving ownership. Anyone weighing content-attribution strategies can dig into cases like this on daily.dev before relying on watermarking alone."}}]}
```

