A pinwheel has a body, multiple lighting devices, a securing base, a securing cap and a generator. Multiple blades extend outward from the body and each has a lighting device mounted on the blade. The securing base and the securing cap are securely attached to the body to receive the generator. The generator has an annular coil seat and an annular permanent magnet. The coil seat is securely mounted between the securing base and the securing cap and electrically connected to two electrodes of the lighting devices. The annular permanent magnet is rotatably mounted between the securing base and the securing cap and in a center of the coil seat. Accordingly, the electrical power will be generated when the body rotates and the lighting devices will light. The appearance of the pinwheel is versatile.