Margin, in this case, refers to the space (or “white space”) around the black marks found in the QR code.
Technically, QR codes should have a minimum margin equal to four “units.” A “unit” is equal to the size of a single block in the QR code — in other words, one “unit” is the size of the smallest “box” in a particular QR code. Note that this means that the actual margin or spacing can vary depending on the amount of data in a particular QR code.
For simpler and more “forgiving” margins, a good recommendation is to take the size of the three larger boxes with borders as the minimum margin size. This will not only eliminate any “margins of error” in scanning but it will also likely look better visually.
In general, if your QR code display has an image or color in the background, leaving this space white is the best bet.
You should avoid placing any design elements — including imagery or typography — in this space.Contactless Menus Digital Menus QR Codes Touchless Menus