The invention relates to a junction box, which comprises a box cover, a box body and a plurality of parallel metal connectors, and is characterized in that the box body is divided into two chambers by a baffle plate, and the two chambers are respectively a closing chamber and a radiating chamber, wherein a plurality of mounting grooves are mounted in the closing cavity in parallel near the baffle plate, the metal connectors are inlayed in the mounting grooves, the bottom surface of the closing cavity which is faraway from the baffle plate is provided with a hole, a hole is arranged on the baffle plate which is corresponding to the metal connectors, the number of the box cover is two, and the two box covers are respectively a closing cover and a radiating cover, and the closing cover and the radiating cover are matched with the closing cavity and the radiating cavity, and radiating holes are arranged on the lateral surface of the radiating cavity or the radiating cover. The junction box can radiate the portion which needs to radiate in the box body, and close the portion which needs to be closed, optimizes the property of the junction box, and can effectively improve the service span of the junction box.