> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.templated.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# QR Codes and Barcodes

# QR Codes and Barcodes

Generate dynamic QR codes and barcodes in your templates.

## QR Codes

### Adding in Editor
1. Click **QR Code** in the sidebar (or press `Q`)
2. Enter the URL or text to encode
3. Customize colors and size
4. Position on canvas

### Via API
```json
{
  "layers": {
    "qr-layer": {
      "text": "https://example.com/product/123",
      "color": "#000000",
      "background": "#FFFFFF"
    }
  }
}
```

## Barcodes

### Supported Formats
* **CODE128** — Alphanumeric (default)
* **CODE39** — Alphanumeric, uppercase
* **EAN13** — 13-digit product codes
* **EAN8** — 8-digit compact codes
* **ITF14** — 14-digit shipping codes
* **UPC** — 12-digit US product codes

### Adding in Editor
1. Click **Barcode** in the sidebar
2. Enter the value to encode
3. Select barcode format
4. Adjust size and colors

### Via API
```json
{
  "layers": {
    "barcode-layer": {
      "text": "ABC-12345",
      "barcode_format": "CODE128",
      "color": "#000000",
      "background": "#FFFFFF"
    }
  }
}
```

## Common Use Cases

* **Product labels** — EAN13/UPC codes
* **Inventory tracking** — CODE128 with SKUs
* **Marketing** — QR codes to landing pages
* **Event tickets** — QR codes for validation
* **Shipping labels** — ITF14 codes

## Tips

* Ensure sufficient contrast for scanners
* Test generated codes with a scanner app
* Leave whitespace around codes (quiet zone)
* QR codes can store ~3KB of data