The ESI code is a 17-digit unique identification number and it is allotted to every registered establishment. It is generated through the ESIC portal on submission of form-1 along with the required documents or generated on receipt of a survey report from the social security officer.