In recent years, natural language processing (NLP) techniques, including large language modeling (LLM), have contributed significantly to advancements in organic chemistry research. Chemical reaction representations provide a link between NLP models and chemistry prediction tasks and enable the translation of complex chemical processes into a format that NLP models can understand and learn from. However, previous representation methods fail to adequately consider the hierarchical and structural information inherent in chemical reactions. Here, we propose a tool named HiRXN to learn the comprehensive representation of chemical reactions based on their hierarchical structure. In order to significantly enhance feature engineering for machine learning (ML) models, HiRXN develops an effective tokenization method called RXNTokenizer to capture atomic microenvironment features with multiradius. Then, the hierarchical attention network is used to integrate information from atomic microenvironment-level and molecule-level to accurately understand chemical reactions. The experimental results show that HiRXN is capable of representing chemical reactions and achieves remarkable performance in terms of reaction regression and classification prediction tasks. A web server has been developed to provide a specialized service that accepts Reaction SMILES as input and provides predicted results. The Web site is accessible at http://bdatju.com.