Copy/Paste Detector for Source Code
Why Developers Love jscpd
JavaScript, Python, Java, Go, Rust, C++, TypeScript, Ruby... If you can write it, we can scan it. Even your YAML configs aren't safe.
View supported formats →Powered by the Rabin-Karp algorithm. Scans massive codebases before your coffee gets cold.
Learn how it works →One command to rule them all. Works everywhere — your laptop, CI/CD, that ancient Jenkins server nobody wants to touch.
Get started →HTML, JSON, XML, badges for your README. Make technical debt visible (and slightly embarrassing).
Explore reporters →Full API for Node.js. Build your own duplicate-detection empire. We won't judge.
View API documentation →Set a threshold, fail the build, save the day. Your future self will thank you.
Configure thresholds →Implements the Model Context Protocol. Let AI assistants like Claude check your code for duplications directly.
Learn about MCP Server →See It In Action
# Scan your source code
$ jscpd ./src
Clone found (typescript):
- src/utils.ts [10:1 - 25:3] (15 lines, 129 tokens)
src/helpers.ts [5:1 - 20:3]
Clone found (typescript):
- src/utils.ts [45:5 - 62:2] (17 lines, 178 tokens)
src/components/Button.tsx [12:1 - 29:2]
Clone found (javascript):
- src/hooks/useAuth.ts [1:1 - 34:2] (33 lines, 245 tokens)
src/hooks/useSession.ts [1:1 - 34:2]
# ... more clones
Found 90 clones.
Detection time: 434.777ms
💙 Huge Thank You to Our Contributors!
To everyone who has contributed to jscpd — thank you! 🌟
Whether you've submitted code, reported bugs, suggested features, improved documentation, or simply spread the word — your contributions make jscpd better for everyone. We're grateful for every issue closed, every PR merged, and every kind word shared.
With a grateful heart, 🤗
The jscpd Team