Achieving precise individual localization within densely crowded scenes poses a significant challenge due to the intricate interplay of occlusions and varying density patterns. Traditional methods for crowd localization often rely on convolutional neural networks (CNNs) to generate density maps. However, these approaches are prone to inaccuracies stemming from the extensive overlaps inherent in dense populations. To overcome this challenge, our study introduces the Hierarchical Inverse Distance Transformer (HIDT), a novel framework that harnesses the multi-scale global receptive fields of Pyramid Vision Transformers. By adapting to the multi-scale characteristics of crowds, HIDT significantly enhances the accuracy of individual localization. Incorporating Focal Inverse Distance techniques, HIDT adeptly addresses issues related to scale variation and dense overlaps, prioritizing local small-scale features within the broader contextual understanding of the scene. Rigorous evaluation on standardized benchmarks has unequivocally validated the superiority of our approach. HIDT exhibits outstanding performance across various datasets. Notably, on the JHU-Crowd++ dataset, our method demonstrates significant improvements over the baseline, with MAE and MSE metrics decreasing from 66.6 and 253.6 to 59.1 and 243.5, respectively. Similarly, on the UCF-QNRF dataset, performance metrics increase from 89.0 and 153.5 to 83.6 and 138.7, highlighting the effectiveness and versatility of our approach.