# GS1 FNC1 / ASCII 29 (GS) Separator Rules for Variable-Length AIs
> Parse FNC1 (ASCII 29 / <GS>) separators that terminate variable-length GS1 Application Identifiers.

- **Canonical URL:** https://stanzaapi.com/tools/gs1-decoder/ai/fnc1-ascii-29-separator
- **Governing Standard:** GS1 General Specifications & AI Syntax (GS1 Global Standards Architecture)
- **Latency:** <1ms Edge
- **Privacy:** In-memory execution only (zero data stored or logged)

## Technical Overview & Governing Rules
FNC1 is a non-data function character in Code 128 and DataMatrix that marks the end of a variable-length Application Identifier.

When the barcode payload is transmitted as text, FNC1 is represented as ASCII 29 (GS, 0x1D), often displayed as <GS>.

Fixed-length AIs (01, 17, 00, 37) never need a separator; variable-length AIs (10, 21, 30, 240) require one whenever another AI follows.

## Specification Matrix
| AI | Length | Separator Needed | Example |
| --- | --- | --- | --- |
| 01 GTIN | 14 digits (fixed) | No | 0100012345678905 |
| 17 Expiration | 6 digits (fixed) | No | 17260831 |
| 10 Batch/Lot | 1-20 alphanumeric | Yes if not last | 10LOT123<GS> |
| 21 Serial | 1-20 alphanumeric | Yes if not last | 21SN9988<GS> |
| 30 VAR COUNT | 1-8 digits | Yes if not last | 3000000250<GS> |

## Standard JSON Response Model
```json
{
  "raw": "010001234567890510LOT123<GS>17260831",
  "separator": "ASCII 29 (0x1D)",
  "decoded": {
    "10": "LOT123",
    "17": "260831",
    "01": "00012345678905"
  }
}
```

## Frequently Asked Questions & Edge Cases
### Q: What is the FNC1 / ASCII 29 separator?
**A:** FNC1 is a non-data symbol used in GS1-128 and DataMatrix to mark the end of a variable-length Application Identifier. It is transmitted as ASCII 29 (GS, 0x1D). Without it, a parser cannot tell where a variable-length value such as AI (10) batch/lot ends and the next AI begins.

### Q: Which AIs are variable length and need FNC1?
**A:** AIs such as (10) batch/lot, (21) serial number, (30) VAR COUNT, and (240) additional product ID are variable length and need FNC1 when followed by another AI. Fixed-length AIs such as (01), (17), (00), and (37) never need it.
