Examples
Worked examples
- Is an instance
A SWHID swh:1:dir:... cited in a paper to refer to the exact directory state used in an experiment.
- Is an instance
Software Heritage's continuous mirroring of GitHub repositories.
Counter-examples
Looks similar, but isn't
- Not an instance
A snapshot kept solely on the original developer's laptop is not a Software Heritage archive object.
- Not an instance
A Zenodo DOI for a software release is a different identifier scheme, complementary to SWHIDs.
Editorial commentary
Software Heritage was launched in 2016 with the stated mission of preserving all source code as part of humanity’s cultural and scientific heritage. Its archive covers over 250 million origins (GitHub, GitLab, Bitbucket, PyPI, Debian, and many other forges and package indexes). Every archived object — file content, directory, revision, release, snapshot — gets a SWHID (e.g. swh:1:cnt:…), an intrinsic identifier derived from the content’s cryptographic hash, allowing the artefact to be cited and retrieved independently of any single forge.
The SWHID identifier scheme
Every object Software Heritage archives — a file’s content, a directory, a revision (commit), a release, or a snapshot of a whole repository — is identified by a Software Heritage persistent identifier (SWHID), of the form swh:1:TYPE:hash (e.g. swh:1:cnt:... for content, swh:1:dir:... for a directory). A SWHID is an intrinsic identifier: derived directly from a cryptographic hash of the object’s own content, not assigned by a central registry the way a DOI is, so the same code archived from two origins resolves to the same SWHID.
What it covers and how it grows
Software Heritage continuously and automatically crawls major public code forges and package indexes, in addition to accepting manual “Save code now” requests for a repository not yet in its automated crawl scope. Its archive spans hundreds of millions of origins and preserves each origin’s full version-control history, not just a single snapshot, distinguishing it from a one-off backup or mirror.
Relationship to other identifiers and repositories
Software Heritage complements, rather than replaces, DOI-minting repositories such as Zenodo: a SWHID identifies exact source-code content at the object level, independent of which forge hosts it, while a Zenodo DOI identifies a specific citeable release deposit. Archives such as France’s national repository HAL reference Software Heritage identifiers directly for long-term preservation guarantees a single forge cannot make on its own, since forges close, get acquired, or delete repositories.
References
- Di Cosmo, R. & Zacchiroli, S., “Software Heritage: Why and How to Preserve Software Source Code,” iPRES 2017.
- softwareheritage.org, SWHID specification and archive-coverage documentation.
Also known as
Software Heritage · SWH
Machine-readable encodings
Use in your systems
<role vocab="credit"
vocab-identifier="https://casrai.org/dictionary/"
vocab-term="Software Heritage archive"
vocab-term-identifier="https://casrai.org/dictionary/term/software-heritage-archive" />{
"@context": "https://schema.org",
"@type": "DefinedTerm",
"@id": "https://casrai.org/dictionary/term/software-heritage-archive",
"name": "Software Heritage archive",
"identifier": "https://casrai.org/dictionary/term/software-heritage-archive",
"description": "A non-profit international initiative based at Inria that systematically crawls, archives, and preserves the world's publicly available source code, including its full version-control history, and issues persistent identifiers (Software Hash Identifiers, SWHIDs) to every archived artefact.",
"inDefinedTermSet": "https://casrai.org/dictionary/domain/data-infrastructure#set",
"url": "https://casrai.org/dictionary/term/software-heritage-archive",
"sameAs": [
"Software Heritage",
"SWH"
],
"license": "https://creativecommons.org/licenses/by/4.0/",
"publisher": {
"@id": "https://casrai.org/#organization"
},
"author": {
"@id": "https://casrai.org/#editorial-team"
},
"datePublished": "2026-05-21T02:18:52",
"dateModified": "2026-08-22T19:45:23",
"inLanguage": "en-GB",
"isAccessibleForFree": true
}







