Messier 12 or M 12 (also designated NGC 6218) is a globular cluster in the constellation of Ophiuchus. It was discovered by the French astronomer Charles Messier on May 30, 1764, who described it as a "nebula without stars". In dark conditions this cluster can be faintly seen with a pair of binoculars. Resolving the stellar components requires a telescope with an aperture of or greater. In a scope, the granular core shows a diameter of 3 (arcminutes) surrounded by a 10 halo of stars.
M12 is roughly 3ð northwest from the cluster M10 and 5.6ð east southeast from star Lambda Ophiuchi. It is also located near the 6th magnitude 12 Ophiuchi. The cluster is about from Earth and has a spatial diameter of about 75 light-years. The brightest stars of M12 are of 12th magnitude. M10 and M12 are only a few thousand light-years away from each other and each cluster would appear at about magnitude 4.5 from the other. With a Shapley-Sawyer rating of IX, it is rather loosely packed for a globular and was once thought to be a tightly concentrated open cluster. Thirteen variable stars have been recorded in this cluster. M12 is approaching us at a velocity of 16 km/s.
A study published in 2006 concluded that this cluster has an unusually low number of low-mass stars. The authors surmise that they were stripped from the cluster by passage through the relatively matter-rich plane of the Milky Way.