Skip to content

Extracting Hazard Statements From a Safety Data Sheet

10 min read · updated August 11, 2026

The hazard statements in section 2 of a safety data sheet are the closest thing in the document to structured data: a code, a standard phrase, and a published list to check both against. The interesting part is the handful of places where the code and the phrase do not carry the same information.

How the codes are numbered

A hazard statement code is the letter H followed by three digits, and the first digit is a class group rather than a sequence position.

  • H2xx — physical hazards. H220, extremely flammable gas; H225, highly flammable liquid and vapour; H226, flammable liquid and vapour.
  • H3xx — health hazards. H302, harmful if swallowed; H314, causes severe skin burns and eye damage; H319, causes serious eye irritation; H335, may cause respiratory irritation; H350, may cause cancer.
  • H4xx — environmental hazards. H400, very toxic to aquatic life; H410, very toxic to aquatic life with long lasting effects.

The remaining two digits identify the hazard class and category, and the whole assignment is fixed by the UN Globally Harmonized System — the publication known as the Purple Book. The code is language-invariant: the German and Japanese versions of the same safety data sheet print different sentences against the identical H314. That property is what makes the code the right primary key and the text a display attribute, not the other way round.

The GHS is revised on a two-year cycle and the current publication at the time of writing is the eleventh revised edition, published in September 2025. UNECE publishes the GHS and its revisions. National implementations adopt revisions on their own timetables, so a safety data sheet in circulation may be classified under an earlier edition and remain compliant. Validate codes against a list that covers several editions rather than only the newest.

The codes with a blank in them

This is the asymmetry that makes the pairing worth keeping. Four specific target-organ toxicity statements — H370, H371, H372 and H373 — are published with instructions to the classifier rather than as finished sentences. H370 is “causes damage to organs” followed by a parenthetical directing the supplier to state all organs affected, and a further one to state the route of exposure if it is conclusively proven that no other route causes the hazard.

printed on the sheet:
  H372  Causes damage to organs (liver, kidneys) through
        prolonged or repeated exposure (oral)

stored as code only:
  "H372"          <- organs and route are gone

stored as code + text:
  code: "H372"
  text: "Causes damage to organs (liver, kidneys) through
         prolonged or repeated exposure (oral)"
  organs: ["liver", "kidneys"]      <- derived, and checkable
  route:  "oral"

The code alone is a true statement about the hazard class and a lossy one about the hazard. Two products can both be H372 and damage different organs by different routes. So the schema needs both fields, and if anything downstream reasons about the hazard rather than merely filing it, the parenthetical contents are worth pulling into their own fields — which is a derivation from the text, not something read off the document, and should be recorded as such.

Precautionary statements have the same shape more often than hazard statements do. P501, on disposal, is published with a blank for the supplier to specify the disposal route in accordance with local regulation. A code-only extraction of P501 records that disposal instructions exist, and not what they are.

Why a three-digit pattern is not enough

A pattern matching the letter H followed by exactly three digits is the obvious way to find these codes and it misses a documented set of them. Several statements carry a lowercase or uppercase suffix that narrows the hazard: H350i is may cause cancer by inhalation, distinct from a bare H350. Reproductive toxicity statements combine effects, so H360 appears with letter combinations indicating whether fertility, the unborn child, or both are affected, and H361 takes a similar suffix for the suspected categories.

Match on H followed by three digits followed by an optional run of letters, and treat the suffixed form as a distinct code rather than normalising it away to its three-digit stem. Normalising loses the route or the effect, which is the same loss as dropping the parenthetical.

Two more pattern traps. Codes are frequently printed as a comma or plus-joined run — a single line reading H302, H315, H319, H335 — so a matcher that returns the first hit per line finds a quarter of them. And the letter H is a common initial elsewhere in the document, so restrict the search to sections 2 and 15 rather than running it over the whole file, which is one of the cases where anchoring on the section structure first makes the rest of the extraction tractable.

Statements that are not H-codes

The European Union’s CLP regulation defines supplemental hazard information statements with the prefix EUH, and they are not part of the UN GHS list. EUH014, reacts violently with water; EUH029, contact with water liberates toxic gas; EUH066, repeated exposure may cause skin dryness or cracking; EUH208, which names a sensitising substance and warns it may produce an allergic reaction. A regular expression for the letter H and three digits will match the trailing part of EUH208 and record it as H208, which is a different thing or nothing at all.

Anchor the pattern so that the H is not preceded by other letters, and treat EUH as its own code space with its own validation list. The converse also holds: a sheet issued for a non-EU market legitimately contains no EUH statements, so their absence is not a defect.

Section 2 carries three further things that belong in the same record. The signal word is one of exactly two values, danger or warning, or absent. The pictograms are named symbols with their own codes. Classification statements — hazard class and category — are printed separately from the hazard statements and are the input from which the statements follow, so a mismatch between them is a genuine document defect worth flagging rather than reconciling.

P-codes and combined statements

Precautionary statements use the letter P and three digits, grouped by the first digit: 1 for general, 2 for prevention, 3 for response, 4 for storage, 5 for disposal. The structural difference from hazard statements is that P-codes combine, and the combined form is a single statement rather than a list.

P305+P351+P338
  "IF IN EYES: Rinse cautiously with water for several
   minutes. Remove contact lenses, if present and easy to
   do. Continue rinsing."

split on "+" into three codes and you keep the phrases
but lose that they are one instruction, in that order,
for one exposure scenario.

Store the combined code as the identifier, with the constituent codes as a derived list if you need them — a nested rather than flattened schema. Splitting first and rejoining later does not reconstruct the ordering guarantee, and a response instruction whose steps are reordered is a materially different instruction.

Finally, expect the code and the text to disagree occasionally. Safety data sheets are authored in document systems where the text is typed rather than looked up, and a phrase can be a paraphrase, a translation of a translation, or the wording from an earlier GHS revision. Where the code validates and the text does not match the published phrase, keep both and flag the mismatch for a reviewer with the source passage highlighted— the code is the more reliable of the two, but a systematic divergence across a supplier’s sheets is information about that supplier’s process.