You need to find out what size handlebar you have, in the sense of where the handlebar attaches to the stem.
Swapping will affect the handling, this may not be an issue though
Most modern stems / handlebars are 31 8mm, the other size is 25.4mm.
Handlebar stem sizes are primarily determined...