The application discloses a charging device, which comprises a shell, a winding reel, a data line, a swing element and two elastic elements. The winding reel is rotationally connected with the shell. The data line is wound on the winding reel. When the data line is pulled out or retracted, the winding reel rotates along the wire-out direction or the wire-in direction, respectively. The swing element is rotationally connected with the shell. When the winding reel rotates, the swing element can be driven to swing, so that the winding reel is locked or unlocked with the shell. When the winding reel is locked with the shell, the rotation of the winding reel along the wire-in direction is prevented, and the rotation of the winding reel along the wire-out direction is allowed, so that the winding reel is unlocked with the shell. The two elastic elements are located on both sides of the swing element along the swing direction of the swing element, respectively. The elastic elements are connected with the swing element and the shell, and are used for keeping the swing element in contact with the winding reel, so that the winding reel can drive the swing element to swing when the winding reel rotates. The overall volume of the charging device can be reduced, and the carrying and storage of the charging device are more convenient.