In this paper, we study how to fuse two W states into a larger W state in a cavity quantum electrodynamic system. Two atoms are collided within a detuned vacuum cavity mode. One atom is from the first N-atom W state system, and the other is from the second M-atom W state system. The two atoms will be detected after flying out of the cavity mode. If only one excitation is detected between the two atoms, an (N + M − 2)-atom W state can be generated with some probability. If no excitation is detected between the two atoms, the remaining (N − 1)-atom W state and (M − 1)-atom W state can be re-fused using the same procedure, continuing until two excitations are detected between the two atoms. Using this procedure, the chance of entanglement of the two W states is as large as possible. A feasibility analysis indicates that this scheme can be implemented using existing experimental technologies.