What is an IP Code?
The IP Code, or Ingress Protection Code is defined in IEC standard 60529 which classifies and rates the degree of protection provided by mechanical casings and electrical enclosures against intrusion, dust, accidental contact, and water.
What is an IP rating?
An IP (Ingress Protection) rating is a standardized two- or three-digit code defined by IEC 60529 that classifies the degree of protection an electrical enclosure provides against solid objects, water, and (optionally) mechanical impacts. The first digit indicates solid-particle protection, the second indicates liquid protection, and the optional third indicates impact resistance.
The standard aims to provide users more detailed information than vague marketing terms such as watertight. For example, a cellular phone rated at IP68 is "dust resistant" and can be "immersed in 1.5 meters of freshwater for up to 30 minutes". Similarly, an electrical socket rated IP22 is protected against insertion of fingers and will not be damaged or become unsafe during a specified test in which it is exposed to vertically or nearly vertically dripping water. IP22 or IP2X are typical minimum requirements for the design of electrical accessories for indoor use.A complete description of the IP ratings and associated tests is found in IEC 60529. This standard classifies the degrees of protection provided by the enclosures of electrical equipment, promoting uniformity in both the description of enclosure protection and the tests used to verify it.
IP Ratings Chart: Degrees of Protection for Electrical Enclosures
Refer to the chart below for the ratings of relative protection of electrical enclosures:

The IP rating normally has two (but may have three) numbers:
- Protection from solid objects or materials
- Protection from liquids (water)
- Protection against mechanical impacts (commonly omitted, the third number is not a part of IEC 60529)