
2D Code Decoder
Scan or paste a DataMatrix/QR code to read the GTIN, batch, expiry and serial, and spot mismatches.
Table of contents7 sections
What this tool does
The 2D Code Decoder reads the DataMatrix or QR code on a medicine pack using your camera or pasted text and shows the GS1 fields inside: product GTIN, batch, expiry and serial number. It validates the GTIN check digit and flags any mismatch with the batch and expiry printed on the carton.
Decoding happens entirely in your browser. Nothing is sent to our servers.
How to use it
- 1
Scan or paste
Tap 'Scan with camera' and point at the square code, or paste the code text.
- 2
Read the fields
GTIN (01), expiry (17), batch (10) and serial (21) are shown separately.
- 3
Cross-check the print
Type the batch and expiry printed on the carton; mismatches are flagged in red.
- 4
Verify officially
Use the button to verify the serial on DRAP's track-and-trace portal.
Supported formats
Raw GS1 element strings with FNC1 separators, bracketed '(01)โฆ(17)โฆ' text, and GS1 Digital Link URLs. Plain QR codes and retail EAN-13 barcodes are recognised but carry no pack-level data.
Why a valid code isn't proof
Counterfeiters can copy a genuine code onto many fake packs. The decoder catches inconsistent or invalid codes; only the official system can tell whether a serial has already been dispensed.
Questions about this tool
Does the decoder send my scan anywhere?
No. Decoding happens entirely in your browser. See also: Mehfooz Dawa app.
What does 'check digit invalid' mean?
The GTIN's last digit doesn't match the GS1 checksum, which means it was mistyped or printed incorrectly. On a real pack that's a serious warning sign.
Related guides
Using codesHow to Check a Medicine Barcode in Pakistan: 1D vs 2D Codes Explained
What the barcode on your medicine can and cannot prove, how to scan the new 2D codes, and how to spot a copied or mismatched code.
6 min read
Using codesUnderstanding 2D DataMatrix & QR Codes on Medicine Packs
How serialization works, what the GS1 fields inside the code mean, and how to verify a pack officially.
6 min read
Using codesMehfooz Dawa & DRAP Track-and-Trace: How Official Verification Works
What DRAP's track-and-trace system (Mehfooz Dawa) does, how to use it, its limits today, and how DrugTrace.pk complements it.
5 min read
Topic hub
Mehfooz Dawa & Track and Trace
DRAP's official serial verification: Mehfooz Dawa, the portal and 2D codes.
- Mehfooz Dawa app โ
- Mehfooz Dawa check
- Drug track and trace portal
- drugtrace.dra.gov.pk guide
- Mehfooz Dawa & DRAP verification
- Medicine QR code scanner
- GTIN number check
- 2D DataMatrix codes
- Check medicine barcode
- 2D code decoder tool (this page)
Related topics
