EPC Encoder

Convert GTIN + serial number to EPC hex, binary and URI formats

Free

Fill in the fields and click Encode

What Is an EPC Encoder?

An Electronic Product Code (EPC) encoder converts human-readable product identifiers — company prefix, item reference and serial number — into the standardised 96-bit hexadecimal string that is written to a Gen 2 UHF RFID tag. The encoding standard used here is SGTIN-96 (Serialised Global Trade Item Number, 96-bit), defined in the GS1 EPC Tag Data Standard (TDS). By encoding a GTIN into an EPC, every individual physical item gets a globally unique digital identity that can be read wirelessly at the speed of supply chain operations.

This free online EPC encoder runs entirely in your browser — no data is sent to a server, no account is required, and there is no rate limit for single-tag encoding.

How to Encode an SGTIN-96 EPC

Fill in the four input fields and click Encode. The tool validates your inputs, calculates the correct EPC partition from the company prefix length, packs all fields into the 96-bit structure, and outputs four representations simultaneously: EPC hex, binary, Tag URI and Pure Identity URI.

GS1 Company Prefix

The GS1 Company Prefix is the numeric string assigned exclusively by GS1 to your organisation (for example 0614141). It can be between 6 and 12 digits long depending on your GS1 licence tier. The number of digits determines the EPC partition, which controls how many bits are allocated to the prefix versus the item reference inside the 44-bit combined field. A 6-digit prefix leaves more room for item references; a 12-digit prefix can represent only a single item reference.

Item Reference Number

The item reference, together with the check digit, forms the product part of the GTIN-13. When encoding to SGTIN-96 the check digit is dropped — it is redundant once the data is inside the EPC. The digits of company prefix and item reference always sum to 13. If your company prefix is 7 digits, the item reference must be exactly 6 digits (with leading zeros if needed).

Serial Number

The serial number uniquely identifies one physical instance of a product. SGTIN-96 allocates 38 bits to the serial, supporting values from 0 to 274,877,906,943. Sequential serial assignment within each production batch is best practice — it simplifies inventory reconciliation and makes gap detection trivial.

Filter Value

The 3-bit filter field speeds up targeted reads in mixed-tag environments. By commanding a reader to inventory only tags with a specific filter value — "cases only", for example — you can dramatically reduce scan time in warehouses with simultaneous pallet, case and item-level tagging. Common values: 0 = All others, 1 = Point-of-sale item, 2 = Case, 4 = Inner pack, 6 = Unit load.

SGTIN-96 Bit Structure

A fully encoded SGTIN-96 tag is exactly 96 bits. The allocation is fixed by the GS1 EPC TDS specification:

FieldBitsNotes
Header8Fixed 0x30 for SGTIN-96
Filter3Supply chain level indicator
Partition3Encodes prefix digit length (0–6)
Company Prefix20–40Derived from partition value
Item Reference4–24Derived from partition value
Serial Number38Up to 274 billion unique identities

The partition field is what makes SGTIN-96 flexible: a single encoding format accommodates any GS1 company prefix length (6–12 digits) without wasting bits. Partition 5, for example, means a 7-digit company prefix occupies 24 bits and the item reference occupies the remaining 20 bits.

Tag URI vs. Pure Identity URI

The encoder outputs two URI representations in addition to the raw hex:

  • Tag URIincludes all tag-specific fields (filter value and partition). Used when communicating with physical tag hardware and reader firmware.
  • Pure Identity URIstrips tag-specific fields, leaving only the logical product identity. Used in supply chain messages (EPCIS events) and independent of the physical tag encoding.

Common Encoding Errors

  • Wrong bit countcaused by a mismatch between company prefix length and the expected item reference length. If prefix.length + itemRef.length ≠ 13, the encoder reports a bit-width error.
  • Serial out of rangevalues above 274,877,906,943 exceed the 38-bit serial field. Use the EPC Generator to produce sequential serials within range.
  • Non-numeric charactersEPC fields only accept digits. Leading zeros in the company prefix are significant and must be preserved.

Use Cases for EPC Encoding

  • Retail apparel taggingencode SGTIN-96 EPCs at item level before attaching RFID hang tags on the production line.
  • Pharmaceutical track & traceserialised EPCs enable item-level lot tracking from manufacturer to pharmacy, satisfying DSCSA (US) and FMD (EU) requirements.
  • Warehouse dock door receivingbulk-encoded cartons and pallets read in a fraction of a second without manual scanning.
  • Anti-counterfeitingeach unique EPC serial is verifiable against a brand-owner authentication database in real time.
  • Cold chain monitoringassociate individual EPC-tagged products with temperature logger events via EPCIS for regulatory compliance.