The invention relates to a glass composition for absorbing ultraviolet ray and infrared ray, which comprises a glass basic composition (weight ratio): 60-75% of SiO2, 8-20% of Na2O, 3-12% of CaO, 0.1-5% of Al2O3, 2-5% of MgO; 0.02-7% of K2O, 0.1-5% of BaO and 0.01-0.4% of SO3; and a glass body coloring coordination part for absorbing ultraviolet ray and infrared ray: 0.22-1.35% of Fe2O3, 0.001-0.8% of ZrO2+HfO2, 0-0.5% of Cl, 0-2% of B2O3, 0.01-0.8% of TiO2, 0.001-0.06% of CuO; 0-2.0% of Br, 0-0.02% of MnO, 0-2.0% of F, 0.001-0.5% of Sr and 0.005-2.2% of CeO2. The redox ratio of Fe2O3 in the glass composition is 0.4-0.8. Rare metals and rare earth metal compound with a certain amount can be added in the glass composition, limitation of the current heat insulation glass can be breakthrough, chemical oxygen demand of the raw materials and the redox ratio can be controlled in a reasonable mode, obstruction to ultraviolet ray, infrared ray and total energy can be effectively realized, visible light transmittance is simultaneously increased, so that heat insulation glass capable of strongly absorbing the ultraviolet ray and near infrared can be obtained.