Zanni, as much as Harlequin, is originary from Bergamo. The lower Bergamo of course, "Bergam de hüta", where all the poor come from, and he's part of that emigrant population that has to mingle into an hostile environment to survive.
Zanni means the first name "Giovanni" in the dialect of Bergamo, the most common of all Italian names, sort of a John Doe of the times.
The Zanni can be recognized, with good approximation, as the matrix on which other masks were created.
Harlequin, for instance, had (especially in his first years) so much of the Zanni character, that was almost a reflection of it. In later times we also have a primo and secondo Zanni that in a certain way replicate that situation (the smart Harlequin, the dumb Zanni).
Pulcinella, also, in the way he dresses, the typical "poor folk" uniform, is basically a Zanni, although developing a very personal pattern very soon.
Brighella too, shares the hunger and the way he leads his life, no real clue of what goes on, his life an improvisation after another just trying to get by.
Typical feature of the Zanni: poor, desperate, ignorant but smart in his own way, everybody makes fun of him. In a second period he gets his revenge, though, and outsmarts many. He's constantly hungry, and constantly exploited, the primo Zanni smart while the second Zanni hopelessly stupid.
The Zanni defines more a kind of mask, but not a particular one, although on several occasions he gets the name of Zany Cornetto.
Zanni is friend / antagonist of Harlequin, of which he shares not only the roots, but the basic needs, food and lack of nobility.