---
description: The Capacitor NFC plugin enables interaction with NFC tags and provides cross-platform support for Android, iOS, and Web.
title: Capacitor NFC Plugin: Read & Write NFC Tags - Capawesome
image: https://capawesome.io/docs/assets/images/social/blog/announcing-the-capacitor-nfc-plugin.png
---

<!doctype html> 

[Skip to content ](#capacitor-nfc-plugin-read-write-nfc-tags) 

[🖥️ Introducing the **Capacitor Electron Platform** — build desktop apps for macOS, Windows, and Linux. Free & open source. ](/blog/announcing-the-capacitor-electron-platform/) 

* [ SDKs ](/docs/sdks/)
* [ Formbricks ](/docs/sdks/capacitor/formbricks/)
* [ Geocoder ](/docs/sdks/capacitor/geocoder/)
* [ Google Sign-In ](/docs/sdks/capacitor/google-sign-in/)
* [ Grafana Faro ](/docs/sdks/capacitor/grafana-faro/)
* [ Gyroscope ](/docs/sdks/capacitor/gyroscope/)
* [ Haptics ](/docs/sdks/capacitor/haptics/)
* [ Home Indicator ](/docs/sdks/capacitor/home-indicator/)
* [ In-App Browser ](/docs/sdks/capacitor/in-app-browser/)
* [ Install Referrer ](/docs/sdks/capacitor/install-referrer/)
* [ Intercom ](/docs/sdks/capacitor/intercom/)
* [ Intune ](/docs/sdks/capacitor/intune/)
* [ Keep Awake ](/docs/sdks/capacitor/keep-awake/)
* [ libSQL ](/docs/sdks/capacitor/libsql/)
* [ Light Sensor ](/docs/sdks/capacitor/light-sensor/)
* [ Live Update ](/docs/sdks/capacitor/live-update/)
* [ Localization ](/docs/sdks/capacitor/localization/)
* [ Mail Composer ](/docs/sdks/capacitor/mail-composer/)
* [ Managed Configurations ](/docs/sdks/capacitor/managed-configurations/)
* [ Maps Launcher ](/docs/sdks/capacitor/maps-launcher/)
* [ Media Session ](/docs/sdks/capacitor/media-session/)
* [ ML Kit ](/docs/sdks/capacitor/mlkit/)
* [ Navigation Bar ](/docs/sdks/capacitor/navigation-bar/)
* [ Network ](/docs/sdks/capacitor/network/)
* [ NFC ](/docs/sdks/capacitor/nfc/)
* [ Node.js ](/docs/sdks/capacitor/nodejs/)
* [ OAuth ](/docs/sdks/capacitor/oauth/)
* [ Passkeys ](/docs/sdks/capacitor/passkeys/)
* [ Password Autofill ](/docs/sdks/capacitor/password-autofill/)
* [ PDF Generator ](/docs/sdks/capacitor/pdf-generator/)
* [ PDF Viewer ](/docs/sdks/capacitor/pdf-viewer/)
* [ Pedometer ](/docs/sdks/capacitor/pedometer/)
* [ Permissions ](/docs/sdks/capacitor/permissions/)
* [ Phone Dialer ](/docs/sdks/capacitor/phone-dialer/)
* [ Photo Editor ](/docs/sdks/capacitor/photo-editor/)
* [ Photo Manipulator ](/docs/sdks/capacitor/photo-manipulator/)
* [ PixLive ](/docs/sdks/capacitor/pixlive/)
* [ PostHog ](/docs/sdks/capacitor/posthog/)
* [ Printer ](/docs/sdks/capacitor/printer/)
* [ Privacy Screen ](/docs/sdks/capacitor/privacy-screen/)
* [ Proximity Sensor ](/docs/sdks/capacitor/proximity-sensor/)
* [ Purchases ](/docs/sdks/capacitor/purchases/)
* [ RealtimeKit ](/docs/sdks/capacitor/realtimekit/)
* [ Root Detection ](/docs/sdks/capacitor/root-detection/)
* [ Screen Brightness ](/docs/sdks/capacitor/screen-brightness/)
* [ Screen Orientation ](/docs/sdks/capacitor/screen-orientation/)
* [ Screen Reader ](/docs/sdks/capacitor/screen-reader/)
* [ Screenshot ](/docs/sdks/capacitor/screenshot/)
* [ Secure Preferences ](/docs/sdks/capacitor/secure-preferences/)
* [ Settings Launcher ](/docs/sdks/capacitor/settings-launcher/)
* [ Shake ](/docs/sdks/capacitor/shake/)
* [ Silent Mode ](/docs/sdks/capacitor/silent-mode/)
* [ SIM ](/docs/sdks/capacitor/sim/)
* [ SMS Composer ](/docs/sdks/capacitor/sms-composer/)
* [ Speech Recognition ](/docs/sdks/capacitor/speech-recognition/)
* [ Speech Synthesis ](/docs/sdks/capacitor/speech-synthesis/)
* [ Share Target ](/docs/sdks/capacitor/share-target/)
* [ Square Mobile Payments ](/docs/sdks/capacitor/square-mobile-payments/)
* [ SQLite ](/docs/sdks/capacitor/sqlite/)
* [ Superwall ](/docs/sdks/capacitor/superwall/)
* [ System WebView ](/docs/sdks/capacitor/system-webview/)
* [ Tauri ](/docs/sdks/capacitor/tauri/)
* [ Text Interaction ](/docs/sdks/capacitor/text-interaction/)
* [ Text Zoom ](/docs/sdks/capacitor/text-zoom/)
* [ Thermal State ](/docs/sdks/capacitor/thermal-state/)
* [ Toast ](/docs/sdks/capacitor/toast/)
* [ Torch ](/docs/sdks/capacitor/torch/)
* [ Vault ](/docs/sdks/capacitor/vault/)
* [ Volume ](/docs/sdks/capacitor/volume/)
* [ Wallet ](/docs/sdks/capacitor/wallet/)
* [ Wifi ](/docs/sdks/capacitor/wifi/)
* [ YouTube Player ](/docs/sdks/capacitor/youtube-player/)
* [ Zip ](/docs/sdks/capacitor/zip/)
* [ Cordova ](/docs/sdks/cordova/)
* [ Cloud ](/docs/cloud/)
* [ Integrations ](/docs/cloud/live-updates/integrations/)
* Concepts
* Reference
* [ Troubleshooting ](/docs/cloud/live-updates/troubleshooting/)
* [ FAQ ](/docs/cloud/live-updates/faq/)
* [ Native Builds ](/docs/cloud/native-builds/)
* [ Set Up Environments ](/docs/cloud/native-builds/environments/)
* [ Overwrite Native Configurations ](/docs/cloud/native-builds/native-configurations/)
* [ Auto-Increment Build Numbers ](/docs/cloud/native-builds/auto-incrementing-build-numbers/)
* [ Configure the Web Build Script ](/docs/cloud/native-builds/web-build-script/)
* [ Build from a Monorepo ](/docs/cloud/native-builds/monorepo/)
* [ Use pnpm, Yarn, or bun ](/docs/cloud/native-builds/package-managers/)
* [ Install Private npm Packages ](/docs/cloud/native-builds/npm-private-registry/)
* [ Override the Java Version ](/docs/cloud/native-builds/override-java-version/)
* [ Custom iOS Provisioning Profiles ](/docs/cloud/native-builds/custom-ios-provisioning-profiles/)
* [ Build without Git ](/docs/cloud/native-builds/build-without-git/)
* [ Access Git Behind a Firewall ](/docs/cloud/native-builds/firewall-access/)
* [ Integrations ](/docs/cloud/native-builds/integrations/)
* Reference
* [ Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [ FAQ ](/docs/cloud/native-builds/faq/)
* [ App Store Publishing ](/docs/cloud/app-store-publishing/)
* [ Submit a Build ](/docs/cloud/app-store-publishing/submit-a-build/)
* [ Submit Automatically After a Build ](/docs/cloud/app-store-publishing/submit-automatically/)
* [ Troubleshooting ](/docs/cloud/app-store-publishing/troubleshooting/)
* [ FAQ ](/docs/cloud/app-store-publishing/faq/)
* [ Automations ](/docs/cloud/automations/)
* [ Reference ](/docs/cloud/automations/reference/)
* [ Troubleshooting ](/docs/cloud/automations/troubleshooting/)
* [ FAQ ](/docs/cloud/automations/faq/)
* [ Assist ](/docs/cloud/assist/)
* [ CLI ](/docs/cloud/cli/)
* APIs and SDKs
* [ Webhooks ](/docs/cloud/webhooks/)
* [ Integrations ](/docs/cloud/integrations/)
* Account
* [ Organization ](/docs/cloud/organizations/)
* [ Two-Factor Enforcement ](/docs/cloud/organizations/two-factor-authentication/)
* [ Audit Logs ](/docs/cloud/organizations/audit-logs/)
* [ Billing ](/docs/cloud/organizations/billing/)
* [ License Keys ](/docs/cloud/license-keys/)
* [ AI ](/docs/ai/)
* [ Insiders ](/docs/insiders/)
* [ Billing & Plans ](/docs/insiders/billing-and-plans/)
* [ FAQ ](/docs/insiders/faq/)
* [ License ](https://capawesome.io/legal/eula/)
* [ Support ](/docs/support/)
* [ Contributing ](/docs/contributing/)
* Contributing code
* [ Code of Conduct ](/docs/contributing/code-of-conduct/)
* [ Questions ](https://docs.github.com/en/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion#creating-a-discussion)
* [ Blog ](/blog/)
* Categories

* [ FAQ ](#faq)
* [ Closing Thoughts ](#closing-thoughts)

* Related links

# Capacitor NFC Plugin: Read & Write NFC Tags[¶](#capacitor-nfc-plugin-read-write-nfc-tags "Permanent link")

Want to read and write NFC tags from a Capacitor app — for access control, product authentication, inventory, or tap-to-share? The [Capacitor NFC plugin](/docs/sdks/capacitor/nfc/) from Capawesome, sponsored by [NFC21](https://nfc21.de/?%5Flocale=en), lets you interact with Near Field Communication (NFC) tags with cross-platform support for Android, iOS, and Web. The project is available as Sponsorware on [GitHub](https://github.com/capawesome-team/capacitor-plugins).

Let's take a quick look at the [Capacitor NFC API](/docs/sdks/capacitor/nfc/#api) and how you can read and write on passive NFC tags and stickers. For this we will use the NTAG 215 from this [NFC Starter Kit](https://www.nfc-tag-shop.de/en/NFC-Starter-Kit-Medium-12-pieces/68250).

## Installation[¶](#installation "Permanent link")

To install the Capacitor NFC plugin, please refer to the [Installation](/docs/sdks/capacitor/nfc/#installation) section in the plugin documentation.

## Usage[¶](#usage "Permanent link")

Now let's finally start and see the plugin in action.

### Read NFC tags[¶](#read-nfc-tags "Permanent link")

Reading NFC tags is quite simple:

`[](#%5F%5Fcodelineno-0-1)import { Nfc } from "@capawesome-team/capacitor-nfc";
[](#%5F%5Fcodelineno-0-2)
[](#%5F%5Fcodelineno-0-3)const read = async () => {
[](#%5F%5Fcodelineno-0-4)  return new Promise((resolve) => {
[](#%5F%5Fcodelineno-0-5)    Nfc.addListener("nfcTagScanned", async (event) => {
[](#%5F%5Fcodelineno-0-6)      await Nfc.stopScanSession();
[](#%5F%5Fcodelineno-0-7)      resolve(event.nfcTag);
[](#%5F%5Fcodelineno-0-8)    });
[](#%5F%5Fcodelineno-0-9)
[](#%5F%5Fcodelineno-0-10)    Nfc.startScanSession();
[](#%5F%5Fcodelineno-0-11)  });
[](#%5F%5Fcodelineno-0-12)};
`

First you have to add the `nfcTagScanned` listener. This listener is called when an NFC tag is scanned as well as when an NFC tag opens your app. As soon as the listener is active, you can start a new scan session with [Nfc.startScanSession(...)](/docs/sdks/capacitor/nfc/#startscansession). During this session the operating system is looking for NFC tags. Once you are done, end the session with [Nfc.stopScanSession(...)](/docs/sdks/capacitor/nfc/#stopscansession).

### Write NFC tags[¶](#write-nfc-tags "Permanent link")

An NFC tag can contain different types of data in different formats such as **NDEF**. NDEF means **NFC Data Exchange Format** and defines in which format data is stored on NFC tags and in which way it can be read.

Here we create a simple NDEF text record using [NfcUtils](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/nfc/docs/utils/README.md), a utility class with various helper functions:

`[](#%5F%5Fcodelineno-1-1)import { NfcUtils } from "@capawesome-team/capacitor-nfc";
[](#%5F%5Fcodelineno-1-2)
[](#%5F%5Fcodelineno-1-3)const createNdefTextRecord = () => {
[](#%5F%5Fcodelineno-1-4)  const utils = new NfcUtils();
[](#%5F%5Fcodelineno-1-5)  const { record } = utils.createNdefTextRecord({
[](#%5F%5Fcodelineno-1-6)    text: "Capacitor NFC Plugin",
[](#%5F%5Fcodelineno-1-7)  });
[](#%5F%5Fcodelineno-1-8)  return record;
[](#%5F%5Fcodelineno-1-9)};
`

This record can now be written to an NFC tag. A NFC tag may be written to at the moment it is scanned. That means we have to add the `nfcTagScanned` listener again.

`[](#%5F%5Fcodelineno-2-1)import { Nfc } from "@capawesome-team/capacitor-nfc";
[](#%5F%5Fcodelineno-2-2)
[](#%5F%5Fcodelineno-2-3)const write = async () => {
[](#%5F%5Fcodelineno-2-4)  return new Promise((resolve) => {
[](#%5F%5Fcodelineno-2-5)    const record = createNdefTextRecord();
[](#%5F%5Fcodelineno-2-6)
[](#%5F%5Fcodelineno-2-7)    Nfc.addListener("nfcTagScanned", async (event) => {
[](#%5F%5Fcodelineno-2-8)      await Nfc.write({ message: { records: [record] } });
[](#%5F%5Fcodelineno-2-9)      await Nfc.stopScanSession();
[](#%5F%5Fcodelineno-2-10)      resolve();
[](#%5F%5Fcodelineno-2-11)    });
[](#%5F%5Fcodelineno-2-12)
[](#%5F%5Fcodelineno-2-13)    Nfc.startScanSession();
[](#%5F%5Fcodelineno-2-14)  });
[](#%5F%5Fcodelineno-2-15)};
`

Now we can call [Nfc.write(...)](/docs/sdks/capacitor/nfc/#write) and write the record to the NFC tag while the tag is being scanned.

### Make NFC tags read-only[¶](#make-nfc-tags-read-only "Permanent link")

It is possible to make NFC tags permanently read-only using the `makeReadOnly` method:

`[](#%5F%5Fcodelineno-3-1)import { Nfc } from "@capawesome-team/capacitor-nfc";
[](#%5F%5Fcodelineno-3-2)
[](#%5F%5Fcodelineno-3-3)const makeReadOnly = async () => {
[](#%5F%5Fcodelineno-3-4)  return new Promise((resolve) => {
[](#%5F%5Fcodelineno-3-5)    Nfc.addListener("nfcTagScanned", async (event) => {
[](#%5F%5Fcodelineno-3-6)      await Nfc.makeReadOnly();
[](#%5F%5Fcodelineno-3-7)      await Nfc.stopScanSession();
[](#%5F%5Fcodelineno-3-8)      resolve();
[](#%5F%5Fcodelineno-3-9)    });
[](#%5F%5Fcodelineno-3-10)
[](#%5F%5Fcodelineno-3-11)    Nfc.startScanSession();
[](#%5F%5Fcodelineno-3-12)  });
[](#%5F%5Fcodelineno-3-13)};
`

Warning 

This is a **one-way** operation and cannot be undone. Once an NFC tag has been made read-only, it can no longer be written to.

### Send custom commands to NFC tags[¶](#send-custom-commands-to-nfc-tags "Permanent link")

And finally, we can send custom commands to the NFC tag. Which NFC tag supports which commands can be found in the respective specification of the tag. The specification for NTAG 215 can be found [here](https://www.nxp.com/docs/en/data-sheet/NTAG213%5F215%5F216.pdf).

Note 

The codes in the specifications are often in hex format, but the plugin needs them as byte array. The [convertHexToBytes(...)](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/nfc/docs/utils/README.md#converthextobytes) method can help you with this.

In the following example we read the signature of the tag:

`[](#%5F%5Fcodelineno-4-1)import { Nfc } from "@capawesome-team/capacitor-nfc";
[](#%5F%5Fcodelineno-4-2)
[](#%5F%5Fcodelineno-4-3)const readSignature = async () => {
[](#%5F%5Fcodelineno-4-4)  return new Promise((resolve) => {
[](#%5F%5Fcodelineno-4-5)    Nfc.addListener("nfcTagScanned", async (event) => {
[](#%5F%5Fcodelineno-4-6)      const { response } = await Nfc.transceive({
[](#%5F%5Fcodelineno-4-7)        techType: NfcTagTechType.NfcA,
[](#%5F%5Fcodelineno-4-8)        data: [60, 0],
[](#%5F%5Fcodelineno-4-9)      });
[](#%5F%5Fcodelineno-4-10)      await Nfc.stopScanSession();
[](#%5F%5Fcodelineno-4-11)      resolve(response);
[](#%5F%5Fcodelineno-4-12)    });
[](#%5F%5Fcodelineno-4-13)
[](#%5F%5Fcodelineno-4-14)    Nfc.startScanSession();
[](#%5F%5Fcodelineno-4-15)  });
[](#%5F%5Fcodelineno-4-16)};
`

For this, we send the command (`[60, 0]`) to the tag using the [Nfc.transceive(...)](/docs/sdks/capacitor/nfc/#transceive) method and receive the signature as a byte array.

## FAQ[¶](#faq "Permanent link")

### Which platforms does the Capacitor NFC plugin support?[¶](#which-platforms-does-the-capacitor-nfc-plugin-support "Permanent link")

The plugin provides cross-platform support for Android, iOS, and the Web through a single API, so you can share most of your NFC code across platforms.

### Can I write to NFC tags, or only read them?[¶](#can-i-write-to-nfc-tags-or-only-read-them "Permanent link")

You can do both. `Nfc.write(...)` writes NDEF records to a tag while it's being scanned, `makeReadOnly()` permanently locks a tag so it can no longer be written to, and `transceive(...)` sends custom commands to the tag.

### What data format does the plugin use to write tags?[¶](#what-data-format-does-the-plugin-use-to-write-tags "Permanent link")

NFC tags typically store data as **NDEF** (NFC Data Exchange Format). The plugin ships an `NfcUtils` helper class with functions like `createNdefTextRecord()` to build the records you write.

### Can I send low-level commands to an NFC tag?[¶](#can-i-send-low-level-commands-to-an-nfc-tag "Permanent link")

Yes. Use [transceive(...)](/docs/sdks/capacitor/nfc/#transceive) with the tag's tech type and a byte-array command. Commands in a tag's specification are often written in hex, and `convertHexToBytes(...)` converts them to the byte array the plugin expects.

## Closing Thoughts[¶](#closing-thoughts "Permanent link")

The [Capacitor NFC plugin](/docs/sdks/capacitor/nfc/) covers the full NFC workflow — reading tags, writing NDEF records, locking tags, and sending custom commands — across Android, iOS, and Web.

**Related reading:**

* [Exploring the Capacitor NFC API](/blog/exploring-the-capacitor-nfc-api/) — a hands-on look at the API
* [API Reference](/docs/sdks/capacitor/nfc/#api) and the [Demo App](https://github.com/capawesome-team/capacitor-nfc-demo) that shows the plugin in action

**Missing a feature?** [Create a feature request](https://github.com/capawesome-team/capacitor-plugins/issues/new/choose) in our [GitHub repository](https://github.com/capawesome-team/capacitor-plugins).

Join the Capawesome [Discord](https://discord.gg/VCXxSVjefW) server for questions and subscribe to the Capawesome [newsletter](https://capawesome.io/newsletter/) to stay updated.

July 16, 2026 

Back to top

```json
{
      "@context": "https://schema.org",
      "@type": "BlogPosting",
      "headline": "Capacitor NFC Plugin: Read \u0026 Write NFC Tags",
      "description": "The Capacitor NFC plugin enables interaction with NFC tags and provides cross-platform support for Android, iOS, and Web.",
      "image": "https://capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.png",
      "datePublished": "2022-08-17T00:00:00+00:00",
      "dateModified": "2026-07-10T00:00:00+00:00",
      "author": [
        {
          "@type": "Person",
          "name": "Robin Genz",
          "url": "https://github.com/robingenz"
        }
      ],
      "publisher": {
        "@type": "Organization",
        "name": "Capawesome",
        "url": "https://capawesome.io",
        "logo": {
          "@type": "ImageObject",
          "url": "https://capawesome.io/assets/images/logo.svg"
        }
      },
      "articleSection": "Announcements",
      "keywords": ["Announcements", "Capacitor", "SDKs"],
      "isPartOf": {
        "@type": "Blog",
        "@id": "https://capawesome.io/blog/#blog"
      },
      "mainEntityOfPage": "https://capawesome.io/blog/announcing-the-capacitor-nfc-plugin/",
      "url": "https://capawesome.io/blog/announcing-the-capacitor-nfc-plugin/"
    }
{
      "@context": "https://schema.org",
      "@type": "BreadcrumbList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "position": 1,
          "name": "Home",
          "item": "https://capawesome.io/"
        },
        {
          "@type": "ListItem",
          "position": 2,
          "name": "Blog",
          "item": "https://capawesome.io/blog/"
        },
        {
          "@type": "ListItem",
          "position": 3,
          "name": "Capacitor NFC Plugin: Read \u0026 Write NFC Tags",
          "item": "https://capawesome.io/blog/announcing-the-capacitor-nfc-plugin/"
        }
      ]
    }
{"@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{"@type": "Question", "name": "Which platforms does the Capacitor NFC plugin support?", "acceptedAnswer": {"@type": "Answer", "text": "The plugin provides cross-platform support for Android, iOS, and the Web through a single API, so you can share most of your NFC code across platforms."}}, {"@type": "Question", "name": "Can I write to NFC tags, or only read them?", "acceptedAnswer": {"@type": "Answer", "text": "You can do both. Nfc.write(...) writes NDEF records to a tag while it's being scanned, makeReadOnly() permanently locks a tag so it can no longer be written to, and transceive(...) sends custom commands to the tag."}}, {"@type": "Question", "name": "What data format does the plugin use to write tags?", "acceptedAnswer": {"@type": "Answer", "text": "NFC tags typically store data as NDEF (NFC Data Exchange Format). The plugin ships an NfcUtils helper class with functions like createNdefTextRecord() to build the records you write."}}, {"@type": "Question", "name": "Can I send low-level commands to an NFC tag?", "acceptedAnswer": {"@type": "Answer", "text": "Yes. Use transceive(...) with the tag's tech type and a byte-array command. Commands in a tag's specification are often written in hex, and convertHexToBytes(...) converts them to the byte array the plugin expects."}}], "url": "https://capawesome.io/blog/announcing-the-capacitor-nfc-plugin/"}
```
