The Glock 18 is a selective-fire machine pistol variant of the Glock 17 9mm handgun. Austrian made, the Glock 18 was made at the request of the Austrian counter-terrorist unit EKO Cobra. Another variant, the Glock 18C, features a retangular cut on the slide near the barrel to compensate for the recoil its full-auto mode brings. The fire selector on the gun's slide allows the pistol to be fired in either semi or fully automatic, its full-auto mode being able to put out 1,100-1,200 rounds per minute, making it a very useful sidearm in the right hands. It's magazine capacity can vary between 10 to 33 rounds.  
"Essentially an Automatic version of the G17C, the G18 was developed for the Austrian EKO Cobra counter-terrorist force. Classified as a Machine Pistol, the G18 has been equipped with a number of modifications to allow greater control over its very rapid fire. Regardless, the G18 in Automatic is incredibly difficult to fire effectively at anything other than extremely short ranges. "
— Battlelog description
The Glock 18 is an unlockable sidearm in Battlefield 3. The G18 is unlocked at Level 30 and the silenced variant at Level 41. The G18 in BF3 has a rate of fire of 1100 rounds per minute and possesses a 19+1 round magazine. The G18 can be switched between full and semi-automatic fire modes. It deals low damage, but offers decent accuracy, a high magazine and bullet output and has low recoil. It is recommended that this gun is only used in full-automatic at close range, and using semi-auto at medium range. It is a popular secondary weapon among players utilizing the Recon kit because it provides essential defense at close range. The silenced variant makes the rounds travel much slower than that of the weapon without a suppressor, making the weapon even harder to use at longer ranges, but with the advantage of staying hidden.
Note: The 100 kill Service Star dog tag and 500 kill service Star Dog tag for this weapon can only be unlocked by using the un-silenced version of this pistol.