Three phases can be distinguished in Nd‒Fe‒B permanent magnets: a Nd2Fe14B matrix grain phase, a Nd-rich grain boundary phase and a Nd-oxide phases. Common reaction models for leaching, such as the shrinking-particle model, cannot simply be applied to composite Nd‒Fe‒B permanent magnets because of the different chemical reactivities of the crystalline phases mentioned above. Etching the surface of a Nd‒Fe‒B magnet to expose its microstructure to electron microscopy is a necessary practice to correlate the microstructure itself to the specific properties of the magnets. Aqueous solutions of mineral acids are often used for etching purposes. However, these solutions are too low viscous to easily control the etching front and they show little selectivity in the etching process. In our work, the ionic liquid Cyphos IL 101 was used to etch bulk magnets instead of aqueous HCl solutions. The bulk Nd‒Fe‒B magnets were first polished, then exposed to a solution of 3 M HCl in Cyphos IL 101 for different times and at different temperatures. Afterwards, the etched Nd‒Fe‒B magnets were washed with ethanol and acetone. The results were examined via scanning-electron microscopy and image analysis. A commercial software, ImageJ®, was employed for image analysis. The latter technique was used to correlate the etched area (%area) or the grain and oxide size to the etching temperature or the etching time. The grain or the oxide size were calculated as Feret diameter. Image analysis revealed to be a necessary tool to support and correct the findings first suggested by the simple scanning-electron microscopy. The data presented in this article might be reused to corroborate a new reactivity order of the three Nd‒Fe‒B phases, different from that traditionally reported in literature, which is – from the most to the least reactive – grain boundary > oxides > the Nd2Fe14B grain phase.