If your nail gun is pneumatic, yes. Other nail guns may work with electricity or even be battery operated. But pneumatic nail guns specifically require air compressors to work.