.h

5 claimants 3 primary 2 secondary shared primary (3)

SWH popularity

From the SWH-MSR-ARV dataset (Desmazières, Di Cosmo, Lorentz, MSR 2025; file nb_extensions_alphanum.csv) — one row per (ext, year) in the full SWH archive. Case-aggregated. citation.

215.7M
total occurrences
48.2M
since 2019 (22.3%)
1969–2023
years active

Case variants in archive: .h (214.7M), .H (935.1K) — aggregated above.

Attribution status

This extension is attributed to C; C++; Objective-C as primary by 3 authoritative claims.

Authoritative sources: △ Linguist · secondary △ Pygments · secondary ✓ Wikidata · Q15777 ✗ Wikipedia · no claim

Disagree or have a correction? Open a labelling issue.

Prior manual labels (3)

LabelAnnotatorStatusEvidence (excerpt)
pl/cpp
ref
@achermnewObjective C is using .h as well as C and C++. Perhaps other C-like languages are also using .hdiscuss
pl/objective-c
ref
@achermnewObjective C is using .h as well as C and C++. Perhaps other C-like languages are also using .hdiscuss
pl/c
ref
@achermnewObjective C is using .h as well as C and C++. Perhaps other C-like languages are also using .hdiscuss

Claimants (14)

Languages that list .h among their extensions. Strength reflects whether the upstream source treated it as their primary extension.
LanguageSourceStrength
Cwikidataprimary
C++wikidataprimary
Objective-Cwikidataprimary
Clinguistsecondary
Cpygmentssecondary
C (programming language)pygmentssecondary
C++linguistsecondary
C++pygmentssecondary
cpppygmentssecondary
Objective-Clinguistsecondary
Objective-Cpygmentssecondary
Cmanual_review:achermproposed
C++manual_review:achermproposed
Objective-Cmanual_review:achermproposed

Wikidata says… (4)

File formats, image formats, audio codecs and other non-PL entities that claim .h on Wikidata (property P1195) or in the Wikipedia infobox. Source: data/derived/external_extension_index.csv. Click Use as new PL on any row to open the Add-PL form pre-filled with that entry's name, Wikipedia/Wikidata URL, and this extension — one submission creates the PL + claim.
Right entry isn't listed? Add manually ↗
FormatClass (Wikidata P31)Suggested labelMIMENotesAction
header file Q877809
file containing source code with declarations to be textually substituted by users
Use as new PL ↗
C header file Q29642901
file format
file formatUse as new PL ↗
C++ header Q13039854
file format
file formatUse as new PL ↗

Disambiguation rules (3)

Linguist heuristics that decide, by content, which language a .h file actually is.
RulePredictsKindPredicates (truncated)
h/linguist/.h/0Objective-Cpredicates[{"kind": "any", "regexes": ["^\\s*(@(interface|class|protocol|property|end|synchronised|selector|implementation)\\b|#import\\s+.+\\.h[\">])"]}]
h/linguist/.h/1C++predicates[{"kind": "any", "regexes": ["^\\s*#\\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set|(i|o|io)stream)>", "^\\s*template\\s*<", "^[ \\t]*(tr
h/linguist/.h/2Cdefault[]

SWH-mined examples (1)

Real archived programs with this extension, byte-verified against the SWH archive. Useful for deciding what this extension actually is when the attribution is uncertain.
cache_stats_recorder.h · 964 B · seen 34543× in SWH
predicted: C++ via heuristic
swh:1:cnt:87a75d5d2567f8644a4ef41724c6f02105904f7e;origin=https://github.com/kiwibrowser/src.next;anchor=swh:1:rev:b2a61e552c940b89d2ae504de720832780f4e7ea;path=/chrome/browser/cache_stats_recorder.h
Open in SWH · Raw bytes
Request more SWH-mined examples
If the examples above don't disambiguate what .h is, request a fresh mining run.
(or open the pre-filled issue directly)