Skip to main content

NDEF

NDEF: the format that makes a tap open a page.

NDEF, the NFC Data Exchange Format, is the NFC Forum's standard for structuring data on a tag. A phone reads NDEF and nothing else by default, so a tag holding raw bytes in any other arrangement will be detected and then ignored.

A URI record, byte by byte.

Record typeWell Known Type 'U' (URI)
First payload byteAn identifier code that stands in for a common prefix
0x01http://www.
0x02https://www.
0x03http://
0x04https://
Remaining bytesThe rest of the URL as UTF-8

The prefix byte is not decoration. Writing https:// as an identifier code instead of eight literal characters saves seven bytes on every tag, which mattered a great deal more when tags held 48 bytes than it does at 144.

Where this shows up.

Every free NFC-writing app produces NDEF, which is why writing a tag takes seconds and needs no technical knowledge. Knowing the format exists is what lets you diagnose the one failure that looks inexplicable: a tag your phone detects and then does nothing with.

The common mistake.

Assuming a tag that does not open anything is broken. Far more often it holds either no NDEF record at all, or a record whose type the phone does not act on automatically. Rewrite it as a URI record and it works.

Sources.

Every figure above is from one of these. They are the standard, the registry or the platform’s own documentation — read them rather than take our word for it.

Keep reading.