An air compressor comprising: an accommodation box; a body received in the accommodation box, including multiple positioning orifices which are a first positioning orifice and a second positioning orifice; a cylinder received in the accommodation box, connected on the body and communicating with an air storage holder; a motor received in the accommodation box, fixed on the body, wherein a small gear is received in the first positioning orifice, and a connection seat of the motor is accommodated in the first orifice, wherein the motor includes a magnetic coil fitted thereon and made of metal material so as to guide magnetism efficiently, when the motor operates; a transmission mechanism received in the accommodation box, actuating a piston to move in the cylinder reciprocally so as to produce compressed airs, characterized in that: the motor includes two locking extension (46, 47) configured to engage the motor with the body, a first end of a respective one locking extension (46, 47) extends from the motor, and a second end of the respective one locking extension (46, 47) is engaged on the body, hence the motor is fixed on the body securely without using any screws, wherein the two locking extensions symmetrically extend from the magnetic coil which is fitted on the motor, wherein each locking extension has a flexible wing bent inward from an inner side thereof and located away from the head edge, and the body includes two notches symmetrically defined on two sides thereof, such that the flexible wing of each of the two locking extensions is engaged with a corresponding one of the two notches of the body, hence the motor is fixed on the body securely without using any screws, wherein two abutting portions are formed on an inner wall of a first casing and an inner wall of a second casing of the accommodation box, and the two abutting portions are two protrusions of the accommodation box respectively configured to limit the two flexible wings of the two locking extensions between the motor and the body, hence the air compressor is received in the accommodation box stably by using the two flexible wings of the two locking extensions. an accommodation box; a body received in the accommodation box, including multiple positioning orifices which are a first positioning orifice and a second positioning orifice; a cylinder received in the accommodation box, connected on the body and communicating with an air storage holder; a motor received in the accommodation box, fixed on the body, wherein a small gear is received in the first positioning orifice, and a connection seat of the motor is accommodated in the first orifice, wherein the motor includes a magnetic coil fitted thereon and made of metal material so as to guide magnetism efficiently, when the motor operates; a transmission mechanism received in the accommodation box, actuating a piston to move in the cylinder reciprocally so as to produce compressed airs, characterized in that: the motor includes two locking extension (46, 47) configured to engage the motor with the body, a first end of a respective one locking extension (46, 47) extends from the motor, and a second end of the respective one locking extension (46, 47) is engaged on the body, hence the motor is fixed on the body securely without using any screws, wherein the two locking extensions symmetrically extend from the magnetic coil which is fitted on the motor, wherein each locking extension has a flexible wing bent inward from an inner side thereof and located away from the head edge, and the body includes two notches symmetrically defined on two sides thereof, such that the flexible wing of each of the two locking extensions is engaged with a corresponding one of the two notches of the body, hence the motor is fixed on the body securely without using any screws, wherein two abutting portions are formed on an inner wall of a first casing and an inner wall of a second casing of the accommodation box, and the two abutting portions are two protrusions of the accommodation box respectively configured to limit the two flexible wings of the two locking extensions between the motor and the body, hence the air compressor is received in the accommodation box stably by using the two flexible wings of the two locking extensions. the motor includes two locking extension (46, 47) configured to engage the motor with the body, a first end of a respective one locking extension (46, 47) extends from the motor, and a second end of the respective one locking extension (46, 47) is engaged on the body, hence the motor is fixed on the body securely without using any screws, wherein the two locking extensions symmetrically extend from the magnetic coil which is fitted on the motor, wherein each locking extension has a flexible wing bent inward from an inner side thereof and located away from the head edge, and the body includes two notches symmetrically defined on two sides thereof, such that the flexible wing of each of the two locking extensions is engaged with a corresponding one of the two notches of the body, hence the motor is fixed on the body securely without using any screws, wherein two abutting portions are formed on an inner wall of a first casing and an inner wall of a second casing of the accommodation box, and the two abutting portions are two protrusions of the accommodation box respectively configured to limit the two flexible wings of the two locking extensions between the motor and the body, hence the air compressor is received in the accommodation box stably by using the two flexible wings of the two locking extensions.