Skip to content
Language: EN

What is TNF, and why does it change what happens on tap?

TNF, the type name field, is three bits present in every NDEF record. It tells a reader how to interpret the type field that follows, and therefore what kind of thing the payload is. Set it wrong and the tag is perfectly valid, perfectly readable, and does nothing at all.

Three bits with a large job

Android puts it plainly: a logical NDEF record always contains a three bit TNF that provides high level typing for the rest of the record. It does not describe the payload directly, it describes how to read the type field that describes the payload.

One level of indirection, three bits wide, and it decides whether tapping your tag opens a browser or does nothing.

The values and what they mean

The Android reference lists seven constants, which is the complete set.

TNF values and what each declares, per the Android NdefRecord constants
ValueThe type field containsTypical use
Well knownAn NFC Forum defined typeURLs, text, most everyday tags
MIME mediaA MIME typeContact cards, structured payloads
Absolute URIAn absolute URI as defined by RFC 3986Rare, easily confused with the well known URI type
External typeAn external type nameApplication specific records, including app launching
EmptyNothing, the record is emptyA formatted tag with no content
UnknownNothing usefulPayload of undeclared type
UnchangedNothing, used for chunkingContinuation of a split payload

What happens when it is wrong

Nothing dramatic, which is the problem. The tag reads, the record is found, and the platform concludes it has nothing to act on.

The most common mistake is writing a web address as absolute URI when the platform expects a well known URI record. Both are legitimate, both hold the same address, and only one triggers the behaviour people expect.

The second most common is writing a URL as plain text. The address is visible in a reading tool, so the tag looks correct, and no browser opens because a text record is not a request to go anywhere.

What this means in practice

Use a tool that offers content types by name rather than asking you to set fields. Choosing "URL" and typing an address produces a correct record. Choosing "text" and typing an address produces a valid tag that does nothing.

When a tag reads but does not act, check the record type before checking anything else. It is the first thing to suspect and it is almost never the thing people look at, because the content is right there and looks fine.

Android provides helper methods for building well formed records, and its documentation recommends using them rather than assembling fields by hand. That advice generalises: let the tool set the TNF.

Frequently asked questions

Which TNF should I use for a website address?

The well known type for URIs, which every tool exposes simply as a URL option. Absolute URI is a different value that looks correct and does not behave the same way on both platforms.

Can I change the TNF of an existing record?

Not in place. You rewrite the record with the correct type, which on an unlocked tag is simply another write. On a locked tag it cannot be done at all.

Why does my text record show correctly but do nothing?

Because a text record is content rather than an instruction. The platform displays or ignores it, and nothing about it asks the phone to open anything.

Does TNF affect how much space a record uses?

Marginally, through the length of the type field it implies. The well known types are short by design, which is one reason they are preferable for small tags.