The standard ISO 5218 defines the representation of the human sexes by a numeric digital code. It was created by the Data Management and Interchange Technical Committee and proposed in November 1976.

The goal is to represent in a reliable way the human sex in an information system.

The codes used are:

  • 0 = not known,
  • 1 = male,
  • 2 = female,
  • 9 = not specified.

The standard specifies that no importance is to be made on the ordering of male before female or with numerical importance. The order of the sexes reflects the use mainly made in the countries having initiated this standard.

This standard for example is used in France for the INSEE number .