dcd
dcd is a free duplicate-code detector that scans a repository to find repeated code.
What dcd is
dcd is a free duplicate-code detector that scans a repository to find repeated code. Its language-aware parsing, provided via scc, covers 250+ languages. Matching can go beyond identical lines: the --fuzz option uses simhash distance for similar lines, while gap and hole tolerance options account for changes within otherwise matching blocks. The --file option checks one file against the rest of a codebase. Results can be shown as PBM scatter plots or self-contained interactive HTML reports with file heatmaps and scatter plots, or emitted as structured JSON for other tools and CI pipelines. dcd can read .ignore files using .gitignore-style syntax and skip marked code blocks. It is available for Linux and macOS under the GNU Affero General Public License 3.0. Installation requires Go 1.19 or newer. Release 1.1.0 removed Windows support for full filesystem compatibility; Windows users are directed to WSL. Commercial users can buy a year's priority support entitlement for direct email support from the developer, though no price is listed.
Good
- Parses code across 250+ languages
- Can match similar lines with simhash fuzzing
- Generates interactive HTML reports and PBM plots
- Outputs JSON for CI and other tools
- Reads .ignore files and skips marked code blocks
Watch out
- Windows support was removed in release 1.1.0
- Installation requires Go 1.19 or newer
- No IDE integration
Who it suits
dcd suits developers who want repository-level duplicate-code scans, including use in CI pipelines. It also fits users who need visual reports or structured output and can use Linux or macOS, or WSL on Windows.
Verdict
dcd offers flexible duplicate-code matching and several output formats, including JSON for automation. Windows users need WSL, and installation assumes Go 1.19 or newer.
Plans and prices
From dcd's own pricing page, checked 30 Sep 2026.
| Plan | Price | What it gives you |
|---|---|---|
| dcd | Free | AGPL-3.0 open-source license |
| Priority support | — | priority direct email support from the developer · a years worth |
The facts
Each one read from dcd's own pages, with the date it was checked.
What it does
- Commercial support
- Commercial users can purchase a year's priority support entitlement for direct email support from the developer.checked 30 Sep 2026
- Fuzzy matching
- The --fuzz option uses simhash distance to match similar but non-identical lines, with values from 0 to 255.checked 30 Sep 2026
- Gap tolerance
- The --gap-tolerance option bridges inserted, deleted, or modified lines in otherwise matching duplicate blocks.checked 30 Sep 2026
- Hole tolerance
- The --max-hole-size option allows modified lines within a duplicate diagonal match.checked 30 Sep 2026
- Ignore support
- dcd supports .ignore files using the same syntax as .gitignore files and can ignore marked code blocks.checked 30 Sep 2026
- Installation
- Users with Go 1.19 or newer can install dcd with go install github.com/boyter/dcd@latest.checked 30 Sep 2026
- Language coverage
- The comparison table says dcd provides language-aware parsing via scc for 250+ languages.checked 30 Sep 2026
- License
- The project is licensed under the GNU Affero General Public License 3.0.checked 30 Sep 2026
- Purpose
- dcd is a duplicate code detector designed to identify duplicate code within a project.checked 30 Sep 2026
- Release limitation
- Release 1.1.0 removed Windows support for full filesystem compatibility and directs Windows users to WSL.checked 30 Sep 2026
- Single-file comparison
- The --file option compares one file against the rest of the codebase.checked 30 Sep 2026
- Structured output
- The --format json option produces structured JSON output for integration with other tools or CI pipelines.checked 30 Sep 2026
- Visualizations
- dcd can generate PBM scatter plots and self-contained interactive HTML reports with file heatmaps and scatter plots.checked 30 Sep 2026
The company
- Maker background
- Ben Boyter describes himself as a professional software engineer with more than 15 years of development experience focused on testing.checked 30 Sep 2026
The full review of dcd
Overview
dcd is a free, open-source duplicate-code detector for repository-scale analysis. It suits developers and engineering teams that need to tune what counts as a clone, inspect duplication visually, and feed findings into automation. Its text-based approach and broad language parsing make it practical for many codebases, while Windows support requires a workaround.
The project is released under the GNU Affero General Public License 3.0 and is available as a self-hosted command-line tool. Ben Boyter, a professional software engineer with more than 15 years of development experience focused on testing, is the developer behind it.
Key features
dcd uses text clone detection with language-aware parsing through scc for more than 250 languages. That breadth is valuable for repositories containing several languages, although parsing coverage does not turn the tool into an IDE assistant: there is no IDE integration.
The --fuzz option uses simhash distance to find similar but non-identical lines, with values from 0 to 255. Lower or higher settings let a team choose between stricter matches and broader near-duplicate discovery, but the setting needs deliberate tuning to avoid noisy results.
--gap-tolerance bridges inserted, deleted, or modified lines inside otherwise matching duplicate blocks. --max-hole-size allows modified lines within a duplicate diagonal match. Together, these controls are useful when copied code has drifted, rather than remaining an exact block. The --file option compares one file with the rest of the codebase, making focused investigations faster than starting with a full repository comparison.
For visual review, dcd creates PBM scatter plots and self-contained interactive HTML reports containing file heatmaps and scatter plots. Those outputs help reviewers see concentration and distribution of clones instead of relying only on text listings. The --format json option produces structured output for other tools and CI pipelines, and CI integration is supported.
Ignore files use the same syntax as .gitignore files, and dcd can ignore marked code blocks. This is important for excluding generated or intentionally repeated sections without weakening the matching rules for the rest of a scan.
Pricing
The dcd plan costs free and includes the AGPL-3.0 open-source software. It is the right choice for individual developers, teams comfortable operating a self-hosted command-line tool, and organizations that can work within the license.
Commercial users can buy Priority support, billed as a year's worth of entitlement, for direct email support from the developer. The price is custom pricing. This add-on is relevant when response access matters in production; it does not change the software's free licensing model.
Platforms
dcd runs on Linux and macOS. Go 1.19 or newer users can install it with go install github.com/boyter/dcd@latest. Release 1.1.0 removed Windows support for full filesystem compatibility, so Windows users must use WSL. That makes dcd a stronger fit for Unix-based development environments than for teams expecting a native Windows executable.
Who it's for
Choose dcd for repository maintainers, refactoring efforts, and CI checks where adjustable near-duplicate matching is more useful than a binary exact-copy report. Its JSON, HTML, and PBM outputs suit teams that need both machine-readable gates and human review. It is less suitable for users who require native Windows operation or editor-integrated feedback.
Pros and cons
- Pros: Matching controls cover fuzzy similarity, gaps, and modified-line holes, so scans can reflect the way duplicated code evolves.
- Pros: JSON output and CI integration support repeatable automated checks.
- Pros: Interactive HTML heatmaps and scatter plots make duplication patterns easier to investigate.
- Pros: Parsing through scc covers more than 250 languages, and .ignore support helps keep intentional or generated repetition out of results.
- Cons: Windows users need WSL because native support was removed in release 1.1.0.
- Cons: There is no IDE integration, so findings remain outside the editor workflow.
- Cons: The AGPL-3.0 license and command-line, self-hosted model may require more operational and licensing consideration than a hosted commercial service.
Alternatives
Duplo is a free Linux, macOS, and Windows option with prebuilt binaries for Alpine Linux, macOS, and Windows, making it preferable when native Windows distribution matters.
PMD is a free, BSD-style-licensed static code analyzer for Linux, macOS, self-hosted deployments, and Windows; choose it when a broader static-analysis tool is the priority.
Simian Similarity Analyzer is free, open source, Apache-licensed software for Linux, macOS, and Windows, suitable when that license and platform mix fit better.
CloneWorks is free on Linux, macOS, and Windows, with acknowledgement and free-redistribution requirements.
jscpd is a free option spanning API, Linux, macOS, self-hosted, and Windows environments.
NiCad is free, MIT-licensed software for Linux, macOS, self-hosted, and Windows, but requires OpenTxl 11 or later.
CCFinderSW is a free, MIT-licensed Windows-only tool requiring Java Runtime Environment 8 or later.
Algo VPN is a free, self-hosted VPN setup project rather than a duplicate-code detector, so it is not a direct substitute for dcd.
For a broader category comparison, see the Code Clone Detection Tools list.
Verdict
dcd is a strong choice for Linux and macOS developers who want configurable duplicate detection, broad language coverage, visual reports, and JSON suitable for CI. Choose it when repository-level, self-hosted analysis matters most. Look elsewhere if native Windows support or IDE integration is essential.

