Skip to main content
v2026.11,772 entries · CC-BY 4.0
Dictionary termTrack BProposedv2026.2

Software Heritage archive

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.

ByCASRAI Editorial Board
· Last updated 22 Aug 2026
Share this

Ask CASRAI · included with Regulatory Radar

Ask about Software Heritage archive

Ask CASRAI answers research-administration questions and cites the passages behind every claim — and says so when the corpus does not cover something, instead of guessing. It comes with a Regulatory Radar subscription at $29 a month, alongside the daily digest of regulatory changes and the dashboard of what changed.

150 questions a day, on this site, over the API, or inside your own tools through the CASRAI MCP server.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

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

JATS XML <role> element
xml
<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" />
Schema.org DefinedTerm (JSON-LD)
json
{
  "@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
}

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Regulatory Radar

Stop finding out after the fact

$29/month, cancel anytime. Daily digest updates from our analysis, a dashboard holding the same items, and a cited assistant for everything they raise.

  • Federal Register, Federal Register+, Grants.gov, Regulations.gov, NSF News, UKRI, plus CASRAI’s own published content.
  • 72,264 indexed passages, and every answer cites the ones it drew on.