This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.

This API is available on Firefox OS for privileged or certified applications only.

MozNFCTag contains the basic functions needed to read, write, and inspect NDEF-compatible NFC Tags.


Calling makeReadOnly() will make the NDEF stored on this tag read only. Avalable in Firefox OS 2.2+.
Formats this tag as NDEF-compatible. Avalable in Firefox OS 2.2+.
readNDEF() retrieves the NDEF contents stored on this Tag, and returns the NDEF as an array of MozNDEFRecord objects.
writeNDEF() takes an array of MozNDEFRecord objects, and writes them to a NDEF-compatible tag.


 MozNFCTag.techList Read only
The supported NFC Technologies of this tag. Read only
The identifier of this tag.
MozNFCTag.type Read only
The type of this tag,
MozNFCTag.maxNDEFSize Read only
The maximum size of NDEF can be stored on this tag.
MozNFCTag.isReadOnly Read only
Indicate whether the NDEF content stored on this tag read-only or not.
MozNFCTag.isFormatable Read only
Inidicate whether this tag is NDEF-compatible or not.
MozNFCTag.canBeMadeReadOnly Read only
Indicate whether the NDEF stored on this tag could be configured as read-only or not.
MozNFCTag.isLost Read only
Indicate whether if this tag is already lost. (i.e. is moved out of range) 

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support

Not supported

Not supported Not supported Not supported Not supported
Feature Android Firefox Mobile (Gecko) Firefox OS (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support Not supported Not supported 2.0 moz [1] Not supported Not supported Not supported

[1] Available in privileged apps as of Firefox OS 2.2; certified-only before that.


The NFC implementation in Gecko follows the NFC Forum specifications.

See also

Document Tags and Contributors

Contributors to this page: chrisdavidmills, teoli, allstars.chh, lgarner
Last updated by: chrisdavidmills,