Polycrystalline materials are ubiquitous, and their macroscopic properties strongly depend on the defects in crystalline structures. Grain boundaries (GBs) are the interfaces between crystal grains, which admit unique atomic arrangements different from those of crystals. It is essential to reveal the polyhedral arrangement in GB atomic structures to identify the origin of structure-property relationships in polycrystalline materials. We found that the GB region can only be packed by the bulk or GB-type polyhedral units with minor variations. Moreover, the GB hierarchy directly follows the distribution of rational numbers that is represented by the Farey diagram. The singular GB is defined to be a GB packed by at the most two types of polyhedral units in a period, and any GB can be packed by the polyhedral units that form the singular GBs. This approach allows us to predict the polyhedral arrangement in any tilt GBs including random GBs.