ICD-10 Code Format Validator
Validate ICD-10 code format (letter + 2 digits + optional dot + 1-4 alphanum).
ICD-10: the WHO international classification of diseases
The ICD-10 (International Classification of Diseases, 10th Revision) is the standard diagnostic taxonomy maintained by the World Health Organization (WHO). It was endorsed by the 43rd World Health Assembly in 1990 and started global rollout in 1994, superseding ICD-9 (in use since 1975). The revision expanded the catalogue from roughly 17,000 codes to more than 70,000 in clinical extensions, allowing far finer granularity for billing, epidemiology and public health analytics.
In Brazil the classification is locally known as CID-10 and is curated by DATASUS, the IT arm of the Ministry of Health. It feeds national systems such as SIM (mortality), SINASC (births), SINAN (notifiable diseases) and the e-SUS APS, providing comparable data across all 5,570 municipalities. The WHO has already published ICD-11 (in force since January 2022), but most countries — Brazil included — continue to operate on ICD-10 while migration plans are designed.
Code format and regex
An ICD-10 code follows a deterministic layout: 1 capital letter + 2 digits, optionally followed by a dot and 1 to 4 more digits. A practical regular expression is:
^[A-TV-Z][0-9]{2}(\.[0-9]{1,4})?$
Examples: A09 (infectious gastroenteritis), E11.9 (Type 2 diabetes without complications), J45.901 (mild asthma with acute exacerbation, ICD-10-CM extension), U07.1 (COVID-19, virus identified). Note that the WHO never uses the letter U alone — U00–U85 are reserved for special purposes such as emergency codes and antimicrobial resistance.
Chapter map: what each letter encodes
- A–B — Certain infectious and parasitic diseases (cholera, tuberculosis, HIV, dengue).
- C / D0–D4 — Neoplasms (malignant and in-situ tumours).
- D5–D8 — Blood, blood-forming organs and immune disorders.
- E — Endocrine, nutritional and metabolic (E10 type 1 diabetes, E11 type 2, E66 obesity).
- F — Mental and behavioural disorders (F32 depression, F41 anxiety, F90 ADHD).
- G — Nervous system (G35 multiple sclerosis, G40 epilepsy).
- H0–H5 — Eye and adnexa; H6–H9 ear and mastoid.
- I — Circulatory system (I10 hypertension, I21 acute myocardial infarction, I63 stroke).
- J — Respiratory (J18 pneumonia, J45 asthma, J44 COPD).
- K — Digestive (K29 gastritis, K57 diverticulitis).
- L — Skin and subcutaneous tissue.
- M — Musculoskeletal (M54 back pain, M79 fibromyalgia).
- N — Genitourinary system.
- O — Pregnancy, childbirth, puerperium.
- P — Perinatal conditions originating before/during birth.
- Q — Congenital malformations and chromosomal abnormalities.
- R — Symptoms, signs and abnormal findings (R51 headache, R10 abdominal pain).
- S–T — Injury, poisoning and external consequences.
- V–Y — External causes of morbidity (V transport, W falls, X assault, Y intentional self-harm).
- Z — Factors influencing health status and contact with services (Z00 routine exam, Z23 vaccination).
- U — Special purposes (
U07.1COVID-19 confirmed,U07.2COVID-19 suspected).
Where ICD-10 is required
- Medical billing: every Brazilian guia TISS for private health insurance must include the CID-10. Hospitals match it with the TUSS procedure table.
- Atestado médico: the CID-10 only appears on the attestation with patient consent (Resolução CFM 1.658/2002), but INSS perícia médica mandates it.
- Public-health surveillance: DATASUS aggregates anonymised CID-10 to publish DataSUS dashboards.
- Research and epidemiology: PubMed, SciELO and the Brazilian Boletim Epidemiológico use ICD-10 to compare studies internationally.
- Death certificate: cause of death encoded with ICD-10 underpins life-expectancy and mortality rates.
Companion code sets you may confuse with ICD-10
ICD-10 is a diagnosis code. Around it orbit several other catalogues that solve adjacent problems and must not be mixed up:
- ICD-10-CM — Clinical Modification used in the United States; it adds the seventh character and laterality (
S52.501A). Brazilian validators normally accept the international root but reject the CM-only extension. - ICD-10-PCS — Procedure Coding System, also US-only.
- CPT (AMA) — Current Procedural Terminology, the US procedure counterpart.
- SNOMED CT — much larger clinical ontology often paired with ICD-10 for EHR semantics.
- DSM-5 — American Psychiatric Association manual; many F codes have a DSM equivalent.
- OPS / TUSS / SUS-AIH — Brazilian procedure tables that travel together with the CID-10.
- SOAP notes — Subjective, Objective, Assessment, Plan; structure of the clinical record where the CID-10 is recorded under "Assessment".
Validation strategy
A robust ICD-10 validator runs two layers: (1) the regex above to confirm format, and (2) a lookup against an authoritative master list, because not every syntactically valid string is an issued code (e.g. X99.9 exists but X98.9 does not). Free machine-readable sources include the WHO ICD-API, OpenICD, the DATASUS CID-10 ZIP and the US CMS annual release. This tool focuses on the syntactic layer and is meant to plug into a downstream catalogue lookup.
FAQ
Does Brazil use ICD-10 or ICD-11? Officially ICD-10, through DATASUS. ICD-11 has been adopted by some countries but the Brazilian transition is still planned with no firm date.
Is the CID-10 mandatory on a medical attestation? Only with the patient's consent for general use, but mandatory for INSS expert evaluations and most private-insurance reimbursements.
What is the U07.1 code? The WHO emergency code created in March 2020 for confirmed COVID-19. U07.2 covers suspected/probable cases without lab confirmation.
Why does the regex skip the letter U at first? Historically U00–U49 were reserved as provisional WHO codes; the COVID-19 pandemic accelerated their public use. Modern validators accept U with the same length rule.
What happens if I send an ICD-10-CM code to a Brazilian system? Most parsers will truncate at the third or fourth digit. Always strip the seventh CM character before sending to DATASUS or the TISS guide.
Related Tools
CPF Validator
Validate Brazilian CPF numbers instantly using the official algorithm. Useful for testing document validation in applications. No data sent to servers.
Batch CPF Validator
Validate a list of CPFs (one per line) and see which are valid and which are not. No data sent to servers.
Batch CNPJ Validator
Validate a list of CNPJs (one per line) with a summary of valid, invalid and total. No data sent to servers.