Skip to content
Back to search

gemini-watermark-remover

A high-performance, 100% client-side tool for removing Gemini AI image & video watermarks. Built with pure JavaScript using mathematically precise Reverse Alpha Blending. / 基于 JavaScript 的纯浏览器端 Gemini AI 图像和视频无损去水印工具,使用数学精确的反向 Alpha 混合算法

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/gargantuax--gemini-watermark-remover/badge.svg)](/listings/gargantuax--gemini-watermark-remover)

HTML

<a href="/listings/gargantuax--gemini-watermark-remover"><img src="/api/listings/gargantuax--gemini-watermark-remover/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 426 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. [中文文档](README_zh.md)
  2. > 🔥 Tired of Gemini watermarks? Try the more powerful **GPT Image 2** at [pilio.ai](https://pilio.ai) — free for a limited time.
  3. # Gemini Watermark Remover — Lossless Watermark Removal Tool
  4. An open-source tool to **remove Gemini watermarks** from AI-generated images with high-fidelity, reproducible results on supported outputs. Built with pure JavaScript, the engine uses a mathematically exact **Reverse Alpha Blending** algorithm instead of unpredictable AI inpainting.
  5. > **🚀 Looking for the `Online Gemini Watermark Remover (Recommended)`? Try [geminiwatermarkremover.io](https://geminiwatermarkremover.io/)** — free, no install, works directly in your browser.
  6. >
  7. > 💡 Got watermarks that Gemini Watermark Remover can't handle? Try the general-purpose AI watermark remover: [pilio.ai/image-watermark-remover](https://pilio.ai/image-watermark-remover)
  8. <p align="center">
  9. <a href="https://geminiwatermarkremover.io/"><img src="https://img.shields.io/badge/🛠️_Online_Tool-geminiwatermarkremover.io-blue?style=for-the-badge" alt="Online Tool"></a>&nbsp;
  10. <a href="https://geminiwatermarkremover.io/video"><img src="https://img.shields.io/badge/🎬_Video_Remover-New!-ff6b6b?style=for-the-badge" alt="Video Watermark Remover"></a>&nbsp;
  11. <a href="https://chromewebstore.google.com/detail/gemini-watermark-remover/cjlmnfcfnofnglkphbcdclbpimdjkmdf"><img src="https://img.shields.io/badge/🧩_Chrome_Extension-Install-blueviolet?style=for-the-badge" alt="Chrome Extension"></a>&nbsp;
  12. <a href="https://geminiwatermarkremover.io/userscript/gemini-watermark-remover.user.js"><img src="https://img.shields.io/badge/🐒_Userscript-Install-green?style=for-the-badge" alt="Userscript"></a>&nbsp;
  13. <a href="https://pilio.ai/image-watermark-remover"><img src="https://img.shields.io/badge/🧹_General_Remover-pilio.ai-gray?style=for-the-badge" alt="General Watermark Remover"></a>
  14. </p>
  15. <p align="center">
  16. <img src="https://count.getloli.com/@gemini-watermark-remover?name=gemini-watermark-remover&theme=minecraft&padding=7&offset=0&align=top&scale=1&pixelated=1&darkmode=auto" width="400">
  17. </p>
  18. ## Features
  19. - ✅ **100% Local Processing** - All image processing happens locally in your browser or on your machine. Nothing is uploaded.
  20. - ✅ **Mathematical Precision** - Based on the Reverse Alpha Blending formula, not "hallucinating" AI models.
  21. - ✅ **Auto-Detection** - Automatically identifies watermark size and position using Gemini's known output catalog and local anchor search.
  22. - ✅ **Flexible Usage** - Online tool for quick use, Chrome extension or userscript for seamless Gemini page integration, CLI and Skill for scripting and automation.
  23. - ✅ **Video Support** - Remove watermarks from Gemini-generated videos at [geminiwatermarkremover.io/video](https://geminiwatermarkremover.io/video).
  24. - ✅ **Cross-Platform** - Works in modern browsers (Chrome, Firefox, Safari, Edge) and Node.js environments.
  25. ## Gemini Watermark Removal Examples
  26. <details open>
  27. <summary>Click to Expand/Collapse Examples</summary>
  28. | Original Image | Watermark Removed |
  29. | :---: | :----: |
  30. | <img src="docs/demo-before.webp" width="400"> | <img src="docs/demo-after.webp" width="400"> |
  31. </details>
  32. ## ⚠️ Disclaimer
  33. > [!WARNING]
  34. > **USE AT YOUR OWN RISK**
  35. >
  36. > This tool modifies image files. While it is designed to work reliably, unexpected results may occur due to:
  37. > - Variations in Gemini's watermark implementation
  38. > - Corrupted or unusual image formats
  39. > - Edge cases not covered by testing
  40. >
  41. > The author assumes no responsibility for any data loss, image corruption, or unintended modifications. By using this tool, you acknowledge that you understand these risks.
  42. > [!NOTE]
  43. > **Note**: Disable any fingerprint defender extensions (e.g., Canvas Fingerprint Defender) to avoid processing errors. https://github.com/GargantuaX/gemini-watermark-remover/issues/3
  44. ## How to Remove Gemini Watermarks
  45. ### Online Gemini Watermark Remover (Recommended)
  46. For all users — the fastest and easiest way to remove Gemini watermarks from images:
  47. 1. Open **[geminiwatermarkremover.io](https://geminiwatermarkremover.io/)**.
  48. 2. Drag and drop or click to select your Gemini-generated image.
  49. 3. The engine will automatically process and remove the watermark.
  50. 4. Download the cleaned image.
  51. ### Online Video Watermark Remover (New!)
  52. For Gemini-generated **videos** with visible watermarks:
  53. 1. Open **[geminiwatermarkremover.io/video](https://geminiwatermarkremover.io/video)**.
  54. 2. Upload or drag-and-drop your Gemini-generated video.
  55. 3. The tool will automatically detect and remove the watermark from the video.
  56. 4. Download the cleaned video.
  57. > **Note**: Video watermark removal runs entirely in your browser — no files are uploaded to any server.
  58. ### Chrome Extension
  59. Use this if you do not want a userscript manager but still want automatic Gemini page integration for previews, copy, and download actions.
  60. 1. Open [Gemini Watermark Remover on the Chrome Web Store](https://chromewebstore.google.com/detail/gemini-watermark-remover/cjlmnfcfnofnglkphbcdclbpimdjkmdf).
  61. 2. Click **Add to Chrome** and confirm the install.
  62. 3. Open Gemini. The extension will automatically process supported Gemini images.
  63. The popup includes an "Enable on Gemini" toggle. If Gemini becomes slow, behaves unexpectedly, or you need to troubleshoot the page, turn the toggle off and refresh Gemini.
  64. Chrome Web Store installs update automatically. If the Web Store is not reachable in your network, the matching verified zip (`gemini-watermark-remover-extension-v*.zip`) remains available from [GitHub Releases](https://github.com/GargantuaX/gemini-watermark-remover/releases/latest) and the official website download entry for manual unpacked installation.
  65. ### Userscript
  66. 1. Install a userscript manager (e.g., Tampermonkey or Greasemonkey).
  67. 2. Open [gemini-watermark-remover.user.js](https://geminiwatermarkremover.io/userscript/gemini-watermark-remover.user.js).
  68. 3. The script will install automatically.
  69. 4. Navigate to Gemini conversation pages.
  70. 5. Eligible Gemini preview images on the page are replaced in place after processing.
  71. 6. Gemini's native "Copy Image" and "Download Image" actions also return processed results.
  72. Current userscript boundaries:
  73. - no injected per-image controls
  74. - no popup UI or bulk action surface
  75. - page previews and native copy/download flows are both processed when the source image is reachable
  76. - preview images keep the original visible while processing, with a subdued `Processing...` overlay
  77. - if preview processing fails, the original page image stays visible and usable
  78. ### Skill
  79. For workflows that involve AI coding agents:
  80. - `skills/gemini-watermark-remover/` contains a packaged Skill that agents can discover and invoke.
  81. - Install it with `skills.sh` using:
  82. ```bash
  83. pnpm dlx skills add GargantuaX/gemini-watermark-remover --skill gemini-watermark-remover
  84. ```
  85. - Add flags like `--agent`, `--yes`, or `--copy` only if your local setup needs them.
  86. - Usage:
  87. ```bash
  88. node skills/gemini-watermark-remover/scripts/run.mjs remove <input> --output <file>
  89. ```
  90. - See [`SKILL.md`](skills/gemini-watermark-remover/SKILL.md) for agent integration details.
  91. ### CLI
  92. For scripting, CI, and local batch workflows, use the direct CLI:
  93. ```bash
  94. # repo-local
  95. node bin/gwr.mjs remove <input> --output <file>
  96. # installed globally
  97. gwr remove <input> [--output <file> | --out-dir <dir>] [--overwrite] [--json]
  98. ```
  99. Video exports default to the repository's calibrated 12 Mbps AVC profile. For a
  100. quality-sensitive source, request a higher encoder target explicitly:
  101. ```bash
  102. gwr remove input.mp4 --output clean.mp4 --video-bitrate-mbps 20
  103. ```
  104. The CLI reports video frame progress on stderr. `--video-timeout-ms` is an
  105. inactivity timeout: an export may run longer than that value as long as frames
  106. continue to advance.
  107. If you do not have `gwr` installed globally, use:
  108. ```bash
  109. pnpm dlx @pilio/gemini-watermark-remover remove <input> --output <file>
  110. ```
  111. The default CLI file decoder/encoder uses `sharp`. SDK consumers that only use browser or `ImageData` APIs do not need it. If you use the CLI file path in your own project, install `sharp` alongside this package:
  112. ```bash
  113. pnpm add sharp
  114. ```
  115. ### Can't Remove Your Watermark?
  116. This tool targets Gemini's visible watermark (the semi-transparent logo in the bottom-right corner). If your image watermark doesn't match a known Gemini format, or you need to remove other types of image watermarks, try the general-purpose AI watermark remover:
  117. 👉 **[pilio.ai/image-watermark-remover](https://pilio.ai/image-watermark-remover)**
  118. ### Developer Preview
  119. The repository still keeps a local internal preview harness at `/dev-preview.html` for single-image comparison, copy, and download verification.
  120. - This is a retained internal debugging surface, not the public product website.
  121. - The root path `/` now only redirects users toward the official website, the userscript artifact, and the internal preview page.
  122. - Public-facing usage should prefer the official website or the userscript instead of this local preview harness.
  123. ## Development
  124. ```bash
  125. # Install dependencies
  126. pnpm install
  127. # Development build
  128. pnpm dev
  129. # Production build
  130. pnpm build
  131. # Local static serving
  132. pnpm serve
  133. ```
  134. Notes:
  135. - The root path `/` is now a lightweight entry page that points to the official website, the userscript artifact, and the retained internal preview page.
  136. - The internal browser preview harness lives at `/dev-preview.html`, is now kept as a static Chinese-only single-image compare harness for local algorithm/UI debugging, and no longer maintains public-facing locale or theme-switching features.
  137. - `pnpm dev` / `pnpm serve` still host the userscript, probe pages, and these static assets.
  138. - For GitHub issues with Release-hosted samples, `pnpm issue:verify -- --issue <number>` reuses the `gh` login, caches and verifies the samples, and generates a reviewable comment draft. See [GitHub issue sample verification](docs/github-issue-verification.zh.md).
  139. ### Tampermonkey Debugging on macOS
  140. For the repo's fixed-profile workflow on macOS:
  141. ```bash
  142. # Build the latest userscript
  143. pnpm build
  144. # Start a local dist server if needed
  145. pnpm dev
  146. # Open the fixed Chrome profile with remote debugging enabled
  147. ./scripts/open-fixed-chrome-profile.sh --url https://gemini.google.com/app
  148. ```
  149. Notes:
  150. - the fixed profile lives under `.chrome-debug/tampermonkey-profile`
  151. - default CDP port is `9226`
  152. - default proxy is `http://127.0.0.1:7890`; disable it with `--proxy off` if not needed
  153. - reinstall the latest userscript from the active local `pnpm dev` server
  154. - `pnpm dev` starts probing from `http://127.0.0.1:4173/` and auto-increments if that port is already occupied
  155. - if you are following a previously captured debugging session, its port may differ; trust the current `pnpm dev` output instead of hardcoding `4173`
  156. ## SDK Usage (Advanced / Internal)
  157. The package root still exposes an SDK, but this path is intended for advanced or internal integration scenarios:
  158. ```javascript
  159. import {
  160. createWatermarkEngine,
  161. removeWatermarkFromImage,
  162. removeWatermarkFromImageData,
  163. removeWatermarkFromImageDataSync,
  164. } from '@pilio/gemini-watermark-remover';
  165. ```
  166. Use the pure-data API when you already have decoded `ImageData`:
  167. ```javascript
  168. const result = await removeWatermarkFromImageData(imageData, {
  169. adaptiveMode: 'auto',
  170. });
  171. console.log(result.meta.decisionTier);
  172. ```
  173. Use the browser image API when you have an `HTMLImageElement` or `HTMLCanvasElement`:
  174. ```javascript
  175. const { canvas, meta } = await removeWatermarkFromImage(imageElement);
  176. document.body.append(canvas);
  177. console.log(meta.applied, meta.decisionTier);
  178. ```
  179. If you need to process many images, reuse a single engine instance so alpha maps stay cached:
  180. ```javascript
  181. const engine = await createWatermarkEngine();
  182. const first = await removeWatermarkFromImageData(imageDataA, { engine });
  183. const second = await removeWatermarkFromImageData(imageDataB, { engine });
  184. ```
  185. For Node.js integrations, use the dedicated subpath and inject your own decoder/encoder:
  186. ```javascript
  187. import { removeWatermarkFromBuffer } from '@pilio/gemini-watermark-remover/node';
  188. const result = await removeWatermarkFromBuffer(inputBuffer, {
  189. mimeType: 'image/png',
  190. decodeImageData: yourDecodeFn,
  191. encodeImageData: yourEncodeFn,
  192. });
  193. ```
  194. ## Runtime Requirements
  195. ### Web And Userscript
  196. - modern Chrome / Firefox / Safari / Edge class browser
  197. - ES modules
  198. - Canvas API
  199. - Async/Await
  200. - TypedArray (`Float32Array`, `Uint8ClampedArray`)
  201. - for the website copy button: `navigator.clipboard.write(...)` and `ClipboardItem`
  202. ### CLI And Skill
  203. - a local Node.js runtime capable of running this package
  204. - `sharp` installed when using the default CLI file decoder/encoder
  205. - filesystem access for local input/output paths
  206. - for repo-local usage:
  207. ```bash
  208. node bin/gwr.mjs remove <input> --output <file>
  209. node skills/gemini-watermark-remover/scripts/run.mjs remove <input> --output <file>
  210. ```
  211. - for distributed Skill usage, the local environment must be able to execute the packaged `gwr` CLI boundary
  212. ## Testing
  213. ```bash
  214. # Run all tests
  215. pnpm test
  216. ```
  217. Regression tests include image fixtures from `src/assets/samples/`.
  218. Source samples stay in git.
  219. Naming and retention rules for those fixtures are documented in `src/assets/samples/README.md`.
  220. Complex preview/download validation notes are documented in `docs/complex-figure-verification-checklist.md`.
  221. Local files under `src/assets/samples/fix/` are optional snapshot outputs for manual regression checks and are intentionally not tracked by git.
  222. ## Release Notes
  223. See [CHANGELOG.md](CHANGELOG.md) for release history and [RELEASE.md](RELEASE.md) for the local release checklist. The latest post-release closeout is documented in [docs/release-1.0.29-post-release.md](docs/release-1.0.29-post-release.md).
  224. ## How Gemini Watermark Removal Works
  225. ### The Gemini Watermarking Process
  226. Gemini applies watermarks using standard alpha compositing:
  227. $$watermarked = \alpha \cdot logo + (1 - \alpha) \cdot original$$
  228. Where:
  229. - `watermarked`: The pixel value with the watermark.
  230. - `α`: The Alpha channel value (0.0 - 1.0).
  231. - `logo`: The watermark logo color value (White = 255).
  232. - `original`: The raw, original pixel value we want to recover.
  233. ### The Reverse Solution
  234. To remove the watermark, we solve for `original`:
  235. $$original = \frac{watermarked - \alpha \cdot logo}{1 - \alpha}$$
  236. By capturing the watermark on a known solid background, we reconstruct the exact Alpha map and apply the inverse formula to restore the original pixels with zero loss.
  237. ## Detection Rules
  238. The engine uses layered detection to locate and verify watermarks:
  239. 1. **Size catalog lookup** — matches image dimensions against Gemini's known output sizes to predict watermark size and position.
  240. 2. **Local anchor search** — refines the predicted position by scanning pixel data around the expected watermark region.
  241. 3. **Restoration validation** — confirms the detected watermark is real before applying removal, avoiding false positives.
  242. Default watermark configurations:
  243. | Condition | Watermark Size | Right Margin | Bottom Margin |
  244. | :--- | :--- | :--- | :--- |
  245. | Larger Gemini outputs | 96×96 | 64px | 64px |
  246. | Smaller Gemini outputs | 48×48 | 32px | 32px |
  247. ## Project Structure
  248. ```text
  249. gemini-watermark-remover/
  250. ├── bin/ # Published CLI entrypoint (`gwr`)
  251. ├── public/
  252. │ ├── index.html # Entry page for official site / userscript / internal preview
  253. │ ├── dev-preview.html # Internal browser preview harness kept for local debugging
  254. │ └── tampermonkey-worker-probe.* # Probe pages for userscript/debug flows
  255. ├── skills/
  256. │ └── gemini-watermark-remover/ # Distributable agent skill bundle
  257. ├── src/
  258. │ ├── assets/ # Calibration assets and regression samples
  259. │ ├── cli/ # CLI argument parsing and file workflows
  260. │ ├── core/ # Watermark math, scoring, and restoration
  261. │ ├── page/ # Page-side runtime for Gemini page integration
  262. │ ├── sdk/ # Advanced/internal SDK surface
  263. │ ├── shared/ # Shared DOM, blob, and session helpers
  264. │ ├── userscript/ # Userscript entrypoints and browser hooks
  265. │ ├── workers/ # Worker runtime
  266. │ ├── app.js # Internal single-image preview harness entry point
  267. │ └── utils.js # Shared browser helpers for the internal preview page
  268. ├── tests/ # Unit, regression, packaging, and smoke tests
  269. ├── scripts/ # Local automation and debug launchers
  270. ├── dist/ # Build output directory
  271. ├── build.js # Build script
  272. └── package.json
  273. ```
  274. ## Architecture Overview
  275. - `src/core/` contains watermark detection, candidate selection, restoration metrics, and the reverse-alpha removal pipeline.
  276. - `src/userscript/`, `src/page/`, and `src/shared/` implement the real Gemini page integration, including preview replacement plus copy/download interception.
  277. - `src/cli/` and `bin/gwr.mjs` expose file-oriented local automation.
  278. - `skills/gemini-watermark-remover/` provides a distributable Skill that stays on the CLI boundary instead of importing repository internals directly.
  279. - `src/sdk/` remains available for advanced/internal integrations, but it is no longer the primary public entrypoint.
  280. ---
  281. ## Limitations
  282. - Only removes **Gemini visible watermarks** <small>(the semi-transparent logo in bottom-right)</small>
  283. - Supports both **image** and **video** watermark removal — video processing is available via the [online tool](https://geminiwatermarkremover.io/video)
  284. - Does not remove invisible/steganographic watermarks. <small>[(Learn more about SynthID)](https://support.google.com/gemini/answer/16722517)</small>
  285. - Designed for Gemini's current visible watermark pattern <small>(validated against this repo through April 2026)</small>
  286. ## Legal Disclaimer
  287. This project is released under the **MIT License**.
  288. The removal of watermarks may have legal implications depending on your jurisdiction and the intended use of the images. Users are solely responsible for ensuring their use of this tool complies with applicable laws, terms of service, and intellectual property rights.
  289. The author does not condone or encourage the misuse of this tool for copyright infringement, misrepresentation, or any other unlawful purposes.
  290. **THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY ARISING FROM THE USE OF THIS SOFTWARE.**
  291. ## Credits
  292. This project is a JavaScript port of the [Gemini Watermark Tool](https://github.com/allenk/GeminiWatermarkTool) by Allen Kuo ([@allenk](https://github.com/allenk)).
  293. The Reverse Alpha Blending method and calibrated watermark masks are based on the original work © 2024 AllenK (Kwyshell), licensed under MIT License.
  294. ## Related Links
  295. - [Gemini Watermark Tool](https://github.com/allenk/GeminiWatermarkTool)
  296. - [Removing Gemini AI Watermarks: A Deep Dive into Reverse Alpha Blending](https://allenkuo.medium.com/removing-gemini-ai-watermarks-a-deep-dive-into-reverse-alpha-blending-bbbd83af2a3f)
  297. ## License
  298. [MIT License](./LICENSE)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.