Skip to Content
Platform.Ontology

Web NFC

Lets a site read and write NFC tags when the phone touches one.

Asks you firstHardware and accessoriesNFCWeb browsersWhile you use it

In one line

Can scan NFC tags and save to them when your phone touches one

Lets a site read and write NFC tags when the phone touches one.

Reads tag messages (URLs, text, ids) and can write or lock them. A site can learn which tags the person tapped, for payments tags, tickets or inventory.

What it can and can't do

What the user does: You tap Scan or Save, allow NFC, then hold your phone near a tag.

It can

  • Scan a tag your phone touches
  • Save text or a link onto a tag
  • Work only while the page is open and in front

It cannot

  • Work in the background or when the page is hidden
  • Work if NFC is turned off in your phone settings
  • Work on iPhone, or in Firefox or Safari
  • Use your phone's wallet or payment cards

How it differs between platforms: Only Chrome on Android supports it. iPhone does not.

Browser support

BrowserStatusFirst versionReleasedNote
ChromeNot supportedNot availableNot listedNone
EdgeNot supportedNot availableNot listedNone
FirefoxNot supportedNot availableNot listedNone
SafariNot supportedNot availableNot listedNone
Safari on iPhoneNot supportedNot availableNot listedNone
Chrome on AndroidSupported892021-03-02None
Samsung InternetSupported15.02021-08-13None

How a site asks for it

APInew NDEFReader().scan(), reader.onreading, new NDEFWriter()/ndef.write(), makeReadOnly()
Permission namenfc
Permissions policynfc
Browser compat keysapi.NDEFReader
api.NDEFReader.makeReadOnly
api.NDEFMessage
How access is grantedprompt
What the user seesPermission prompt, plus a system NFC on setting; page must be in foreground
Needs a secure context (HTTPS)Yes
Needs a user gestureYes
How long it lastsPer origin
How to take it backSite settings
Inside an iframeTop level and same origin only; cross-origin iframes blocked

Typical flow

  1. Click
  2. scan() prompts
  3. Bring tag near the phone
  4. onreading delivers serialNumber and NDEF records

Data you get

What comes back: NDEF records from tags
Shape: event
How often: per tap

FieldTypeUnitRangePrecision
serialNumberstringNonetag UID, 4, 7 or 10 bytesunique per tag
records[].recordTypeenumNonetext, url, mime, smart-poster, absolute-url, external, unknownNot listed
records[].databinarybytestag capacity (NTAG213 144 B, NTAG215 504 B, NTAG216 888 B)Not listed

Technical limits

  • Only NDEF formatted tags, no card emulation or raw ISO-DEP
  • Only while page is visible and focused
  • Android only: no desktop, no iOS, no Safari, no Firefox
  • Cannot read payment cards

The story

What it is

A site can read or write NFC tags when your phone touches one.

For you

You tap your phone on a tag, and the web page shows what is on it. It only works while the page is open on screen.

For makers

Makers get tag based tools with no app: tickets, inventory and smart posters. It is Chrome for Android only.

Where you see it

TypeExampleApps
liveAn event site checks in guests by tapping an NFC wristband.None named
shoppingA tag on a product opens a page with sizes and reviews.None named
travelA hotel room tag opens the check in page.None named
gamesA treasure hunt site reads tags around a museum.None named
enterpriseA repair crew taps a tag on a machine to load its service log.None named
securityA fake tag could point you to a bad site.None named

Risks

  • Tag tracking
  • Fake tags

What the platform says

  • Google: Web NFC. Chrome's docs say Web NFC lets pages read and write NFC tags, on Android.

Good uses and abuse

Legitimate uses

  • Tap to check in
  • Product pairing
  • Inventory tags

Known abuse

  • Writing hostile tags that launch URLs
  • Tracking tags by UID

Scores

ScoreValueMeaning
Sensitivity3 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction2 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2020, Chrome on Android 100: makeReadOnly() added
  • 2020-07, Chrome on Android 89: Web NFC ships on Chrome Android 89

Sources

How well checked: Checked against real behavior.

On this page