# Barcode block

The **Barcode** block adds a scannable barcode or QR code to an email. Each recipient gets their own code: Pushwoosh builds it at send time from a personalization value, most often a [voucher](/product/content/vouchers/#display-a-voucher-as-a-barcode).

Use it when recipients show the email at a checkout or a counter, for example to redeem a discount voucher in a store, present a loyalty card number, or pick up an order. A cashier scans the code from the phone screen, so nobody types it in by hand.

## Set up the barcode

1. In **Code**, keep `{{voucher}}` when the email is sent with a [voucher pool](/product/content/vouchers/) or click **Merge tag** and choose the tag that stores each recipient's code. Email resolves the tag at send time so each person gets their own scannable value.

   <img src="/emails-drag-and-drop-email-editor-79.webp" alt="Barcode Code field with {{voucher}} and Merge tag button" width="420"/>

2. Choose **Symbology**:

   | Symbology | Use it for | Accepts |
   |---|---|---|
   | **QR** | A square 2D code phones can scan | Any text up to 1000 characters, including alphanumeric codes like `WELCOME2025-A1` |
   | **Code 128** | A linear barcode | Letters, digits, and symbols from the ASCII set, up to 80 characters, including the same alphanumeric codes |
   | **EAN-13** | The common retail barcode in Europe and many other regions | Digits only, 12–13 characters |
   | **EAN-8** | A shorter retail barcode for small packaging | Digits only, 7–8 characters |
   | **UPC-A** | The common retail barcode in North America | Digits only, 11–12 characters |

3. If you chose **QR**, set **Error correction**. This adds spare data so the code can still scan when part of it is covered, worn, or hard to see. Choose **L**, **M**, **Q**, or **H** (default **M**). Higher levels survive more damage but make the pattern denser, which can be harder to read at small sizes. Skip this field for other symbologies.
4. **Print the code in digits** shows the value under the code. It's on by default. To hide the value, turn it off.

   <img src="/emails-drag-and-drop-email-editor-75.webp" alt="Barcode Symbology set to QR, Error correction M, and Print the code in digits checked" width="580"/>

5. In **Appearance**, set **Bars color**, **Background**, **Width (px)**, and **Height (px)** (600 and 200 by default). Leave **Quiet zone, modules** on **Auto** for the default margin.

<img src="/emails-drag-and-drop-email-editor-76.webp" alt="Barcode Appearance settings with Bars color, Background, Width, Height, and Quiet zone" width="580"/>

## Check the code before sending

- On the canvas, the block shows a sample barcode, not the real recipient code. Placeholders such as `{{voucher}}` become a scannable image only at send time. [Send a test email](/product/content/email-content/drag-and-drop-email-editor/create-email-content-with-drag-and-drop-editor/#send-a-test-email) to see the actual code before the campaign goes out.
- Use **EAN-13**, **EAN-8**, or **UPC-A** only for a value that's digits only, at the length each expects. For alphanumeric codes such as `WELCOME2025-A1`, use **Code 128** or **QR**.
- [Smart check](/product/content/email-content/drag-and-drop-email-editor/create-email-content-with-drag-and-drop-editor/#check-your-email-before-sending) warns you if a typed value doesn't match the **Symbology** you chose. It doesn't check a value with a placeholder, such as `{{voucher}}`. If such a value doesn't fit the symbology, the recipient sees a broken image instead of the code.