NFC Data Exchange Format (NDEF)
Technical Specification
NFC Forum
TM
NDEF 1.0
NFCForum-TS-NDEF_1.0
2006-07-24
RESTRICTIONS ON USE
This specification is copyright © 2005-2006 by the NFC Forum, and was made available pursuant to a
license agreement entered into between the recipient (Licensee) and NFC Forum, Inc. (Licensor) and may
be used only by Licensee, and in compliance with the terms of that license agreement (License). If you are
not the Licensee, you are not authorized to make any use of this specification. However, you may obtain a
copy at the following page of Licensor's Website:
http://www.nfc-forum.org/resources/spec_license after
entering into and agreeing to such license terms as Licensor is then requiring. On the date that this
specification was downloaded by Licensee, those terms were as follows:
1. LICENSE GRANT.
Licensor hereby grants Licensee the right, without charge, to copy (for internal purposes only) and share
the Specification with Licensee's members, employees and consultants (as appropriate). This license grant
does not include the right to sublicense, modify or create derivative works based upon the Specification.
2. NO WARRANTIES.
THE SPECIFICATION IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS AND
NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL LICENSOR, ITS
MEMBERS OR ITS CONTRIBUTORS BE LIABLE FOR ANY CLAIM, OR ANY DIRECT, SPECIAL,
INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THE SPECIFICATION.
3. THIRD PARTY RIGHTS.
Without limiting the generality of Section 2 above, LICENSOR ASSUMES NO RESPONSIBILITY TO
COMPILE, CONFIRM, UPDATE OR MAKE PUBLIC ANY THIRD PARTY ASSERTIONS OF
PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS THAT MIGHT NOW OR IN THE
FUTURE BE INFRINGED BY AN IMPLEMENTATION OF THE SPECIFICATION IN ITS CURRENT,
OR IN ANY FUTURE FORM. IF ANY SUCH RIGHTS ARE DESCRIBED ON THE SPECIFICATION,
LICENSOR TAKES NO POSITION AS TO THE VALIDITY OR INVALIDITY OF SUCH
ASSERTIONS, OR THAT ALL SUCH ASSERTIONS THAT HAVE OR MAY BE MADE ARE SO
LISTED.
4. TERMINATION OF LICENSE.
In the event of a breach of this Agreement by Licensee or any of its employees or members, Licensor shall
give Licensee written notice and an opportunity to cure. If the breach is not cured within thirty (30) days
after written notice, or if the breach is of a nature that cannot be cured, then Licensor may immediately or
thereafter terminate the licenses granted in this Agreement.
5. MISCELLANEOUS.
All notices required under this Agreement shall be in writing, and shall be deemed effective five days from
deposit in the mails. Notices and correspondence to the NFC Forum address as it appears below. This
Agreement shall be construed and interpreted under the internal laws of the United States and the
Commonwealth of Massachusetts, without giving effect to its principles of conflict of law.
NFC Forum, Inc.
401 Edgewater Place, Suite 600
Wakefield, MA, USA 01880
Contents
Contents
1 Overview ........................................................................................................1
1.1 Objectives........................................................................................................................... 1
1.1.1 Design Goals ......................................................................................................... 2
1.1.2 Anti-Goals............................................................................................................. 2
1.2 References .......................................................................................................................... 2
1.3 Administration.................................................................................................................... 4
1.4 Special Word Usage........................................................................................................... 4
1.5 Name and Logo Usage ....................................................................................................... 4
1.6 Intellectual Property ........................................................................................................... 4
1.7 Glossary.............................................................................................................................. 5
2 NDEF Mechanisms ........................................................................................7
2.1 Introduction........................................................................................................................ 7
2.2 Intended Usage................................................................................................................... 7
2.3 NDEF Encapsulation Constructs........................................................................................ 8
2.3.1 Message................................................................................................................. 8
2.3.2 Record ................................................................................................................... 8
2.3.3 Record Chunks...................................................................................................... 8
2.4 NDEF Payload Description................................................................................................ 9
2.4.1 Payload Length...................................................................................................... 9
2.4.2 Payload Type......................................................................................................... 9
2.4.3 Payload Identification.......................................................................................... 10
2.5 NDEF Mechanisms Test Requirements ........................................................................... 11
3 The NDEF Specification..............................................................................13
3.1 Data Transmission Order.................................................................................................. 13
3.2 Record Layout.................................................................................................................. 14
3.2.1 MB (Message Begin)........................................................................................... 14
3.2.2 ME (Message End).............................................................................................. 14
3.2.3 CF (Chunk Flag).................................................................................................. 14
3.2.4 SR (Short Record)............................................................................................... 15
3.2.5 IL (ID_LENGTH field is present)....................................................................... 15
3.2.6 TNF (Type Name Format) .................................................................................. 16
3.2.7 TYPE_LENGTH................................................................................................. 17
3.2.8 ID_LENGTH....................................................................................................... 17
3.2.9 PAYLOAD_LENGTH........................................................................................ 17
3.2.10 TYPE................................................................................................................... 17
3.2.11 ID......................................................................................................................... 17
3.2.12 PAYLOAD.......................................................................................................... 18
3.3 THE NDEF Specification Test Requirements.................................................................. 18
4 Special Considerations...............................................................................19
4.1 Internationalization........................................................................................................... 19
4.2 Security............................................................................................................................. 19
4.3 Maximum Field Sizes....................................................................................................... 19
4.4 Use of URIs in NDEF ...................................................................................................... 19
4.5 Special Consideration Test Requirements........................................................................ 20
A. Revision History ..........................................................................................21
NFC Data Exchange Format (NDEF) Page i
Figures
Figures
Figure 1. Example of an NDEF Message with a Set of Records..................................................... 8
Figure 2. NDEF Octet Ordering.................................................................................................... 13
Figure 3. NDEF Record Layout .................................................................................................... 14
Figure 4. NDEF Short-Record Layout (SR=1).............................................................................. 15
Tables
Table 1. TNF Field Values............................................................................................................ 16
Table 2. Revision History.............................................................................................................. 21
Test Requirements
Test Requirements 1. NDEF Mechanisms Test Requirements ..................................................... 11
Test Requirements 2. The NDEF Specification Test Requirements ............................................. 18
Test Requirements 3. Special Consideration Test Requirements.................................................. 20
NFC Data Exchange Format (NDEF) Page ii
Overview
1 Overview
The International Standard ISO/IEC 18092, Near Field Communication – Interface and Protocol
(NFCIP-1), defines an interface and protocol for simple wireless interconnection of closely
coupled devices operating at 13.56 MHz.
The NFC Data Exchange Format (NDEF) specification defines a message encapsulation format to
exchange information, e.g. between an NFC Forum Device and another NFC Forum Device or an
NFC Forum Tag.
NDEF is a lightweight, binary message format that can be used to encapsulate one or more
application-defined payloads of arbitrary type and size into a single message construct. Each
payload is described by a type, a length, and an optional identifier.
Type identifiers may be URIs, MIME media types, or NFC-specific types. This latter format
permits compact identification of well-known types commonly used in NFC Forum applications,
or self-allocation of a name space for organizations that wish to use it for their own NFC-specific
purposes.
The payload length is an unsigned integer indicating the number of octets in the payload. A
compact, short-record layout is provided for very small payloads.
The optional payload identifier enables association of multiple payloads and cross-referencing
between them.
NDEF payloads may include nested NDEF messages or chains of linked chunks of length
unknown at the time the data is generated.
NDEF is strictly a message format, which provides no concept of a connection or of a logical
circuit, nor does it address head-of-line problems.
1.1 Objectives
The NFC Data Exchange Format (NDEF) specification is a common data format for NFC Forum
Devices and NFC Forum Tags.
The NFC Data Exchange Format specification defines the NDEF data structure format as well as
rules to construct a valid NDEF message as an ordered and unbroken collection of NDEF records.
Furthermore, it defines the mechanism for specifying the types of application data encapsulated in
NDEF records.
The NDEF specification defines only the data structure format to exchange application or service
specific data in an interoperable way, and it does not define any record types in detail—record
types are defined in separate specifications.
This NDEF specification assumes a reliable underlying protocol and therefore this specification
does not specify the data exchange between two NFC Forum Devices or the data exchange
between an NFC Forum Device and an NFC Forum Tag. Readers are encouraged to review the
NFCIP-1 transport protocol [ISO/IEC 18092].
An example of the use of NDEF is when two NFC Forum Devices are in proximity, an NDEF
message is exchanged over the NFC Forum LLCP protocol. When an NFC Forum Device is in
proximity of an NFC Forum Tag, an NDEF message is retrieved from the NFC Forum Tag by
means of the NFC Forum Tag protocols. The data format of the NDEF message is the same in
these two cases so that an NFC Forum Device may process the NDEF information independent of
the type of device or tag with which it is communicating.
NFC Data Exchange Format (NDEF) Page 1