I would like to install another 220 volt circuit for an air compressor. The air compressor needs a 20 amp plug at best. Can I put a 20 amp receptacle on a 30 amp circuit and be legal?

The code folks would probably be concerned about the 5 or 6 feet of 20 amp cable from the compressor to the receptacle not being protected.