It is only illegal to modify a magazine to increase its capacity.
If you want to cut one down shorter, as long as it still only holds the legal amount, 5 rounds, you are fine.
Lots of Enfield magazines were cut down to 5 from 10 rounds.
Lots of people put full size AR mags around their .22 mags to make them look cooler.