A mandarin square (), also known as a rank badge, was a large embroidered badge sewn onto the surcoat of officials in Imperial China (decorating hanfu and qizhuang), Korea (decorating the gwanbok of the Joseon dynasty), in Vietnam, and the Ryukyu Kingdom. It was embroidered with detailed, colourful animal or bird insignia indicating the rank of the official wearing it. Despite its name, the mandarin square (buzi) falls into two categories: round buzi and square buzi. Clothing decorated with buzi is known as bufu () in China. In the 21st century, the use of buzi on hanfu was revived following the Hanfu movement.
The history of the square-shaped buzi is unclear. However, in the Yuan dynasty encyclopaedia Shilin Guangji (), as well as contemporary Persian paintings of the Mongol court, there are pictures showing officials wearing clothing with squares on the back, decorated with flora, animals and birds. By the Yuan dynasty, the square-shaped buzi was already worn as clothing ornaments.
Mandarin squares were first authorized for the wear of officials in the sumptuary laws of 1391 of the Ming dynasty. The use of squares depicting birds for civil officials and animals for military officials was an outgrowth of the use of similar squares, apparently for decorative use, in the Yuan dynasty. The original court dress regulations of the Ming dynasty were published in 1368, but did not refer to badges as rank insignia. These badges continued to be used through the remainder of the Ming and the subsequent Qing dynasty until the imperial system fell in 1912.
Ming nobles and officials wore their rank badges on full-cut red robes with the design stretching from side to side, completely covering the chest and back. This caused the badges to be slightly trapezoidal with the tops narrower than the bottom. The Ming statutes never refer to the number of birds or animals that should appear on the badges. In the beginning, two or three were used. In a typical example of paired birds, they were shown in flight on a background of bright cloud streamers on a gold background.