c. 1200 (early 12c. as a surname), masoun, "stoneworker, builder in stone, one who dresses, lays, or carves stone," from Old French masson, maçon "stone mason" (Old North French machun), probaby from Frankish *makjo or some other Germanic source (compare Old High German steinmezzo "stone mason," Modern German Steinmetz, with second element related to mahhon "to make"); from PIE root *mag- "to knead, fashion, fit."
But it also might be from, or influenced by, Medieval Latin machio, matio (7c.) which is said by Isidore to be derived from machina (see machine (n.)). The medieval word also might be from the root of Latin maceria "wall." Meaning "a member of the fraternity of freemasons" is attested from early 15c. in Anglo-French. The Mason jar (by 1868), a type of molded glass jar with an airtight screw lid, used for home preserves, is named for John L. Mason of New York, who patented it in 1858.