Born in the early 2000s from the RFID and contactless smart card technologies like Sony’s FeliCa and NXP’s MIFARE, NFC is now transforming the way devices communicate and interact. It started gaining true popularity in 2011, with the introduction of Google Wallet and Samsung Pay. Today in 2025, NFC is booming not only for lightning-fast contactless payments, but also for contact data sharing with NFC business cards, secure authentication with digital IDs, keyless access solutions in real estate, automotive, and tourism, public transportation ticketing, smart packaging, inventory tracking, and IoT device pairing and more.
Now, we don’t have to imagine a world where you pay for your morning coffee with a simple tap of your phone or unlock your car as you approach it – we live in it. In smart homes, NFC tags can be programmed to control appliances, unlock doors, or even adjust lighting settings with a simple tap of a smartphone. In the realm of events and conferences, NFC-enabled badges allow for seamless check-ins and networking opportunities, so attendees can easily exchange contact information or access event schedules. In fact, the global NFC market size was valued at $30.85 billion in 2024 and is projected to grow at a CAGR of 12.3% from 2025 to 2030, highlighting its growing significance in business applications.
In this article, we will explore what NFC tags are, their types, and how to program NFC tags effectively on both Android and iOS platforms.
Understanding NFC Tags
What is NFC, and an NFC tag?
NFC stands for near-field communication and is based on RFID (Radio Frequency Identification), allowing devices to communicate when they are physically close. NFC tags, cards, and chips are small, passive devices that can store data and communicate with NFC-enabled devices, such as smartphones, tablets, speakers, headphones, game consoles, access control systems, and others.
How Does NFC Work?
For NFC to work, there should be at least a passive NFC device that stores data and an active device (reader) that activates the passive device and can read and write information on it. Thus, there are three main operating modes for NFC:
- Card emulation mode (passive mode): the NFC device behaves like a contactless digital card.
- Reader/writer mode (active mode): the NFC device is active and reads or writes to a passive RFID tag.
- Peer-to-peer mode: two NFC devices exchange information. The initiator device (polling device) requires less power compared to the reader/writer mode because the target (listener) uses its own power supply.
Let’s see how exactly the communication works in the passive operating mode example (when we have the tag and the reader):
1. Field Activation
NFC uses magnetic field induction, which works at a frequency range of 13.56 MHz and offers a data transmission rate of up to 424 kbit/s within a distance of approximately 10 centimeters. The active device – NFC reader – generates this RF electromagnetic field, it powers the passive NFC tag and activates it for communication.
2. Tag Detection & Selection
The reader sends a REQA (Request Command) to detect the tag. If there are multiple tags in range, it initiates an anticollision procedure to identify and select a single tag it has to communicate with using its UID (Unique Identifier).
3. Protocol Activation
The reader and the tag establish communication and its parameters, such as baud rate, framing format, CRC checks and error detection, as well as higher-layer protocols if needed.
4. Data Transfer
The reader sends READ, WRITE, or AUTHENTICATE commands to the tag and it responds with the requested data or status or returns a payload (a URL, text, contact info, WiFi pairing, app launch instruction, etc.)
5. Authentication or Secure Session (optional)
Secure tags (NTAG424 DNA or MIFARE DESFire EV3) may require mutual authentication using AES or 3DES keys, generate cryptographic SUN (Secure Unique NFC) messages, perform session key derivation, anti-tamper checks, or transaction counters.
6. Termination / Field Removal
When the tag moves out of range or the reader disables the field, the tag loses power, and the communication session ends.
What are the Applications of NFC?
NFC is very simple in use: you only have to place an NFC-enabled device close to the tag – and the communication initiates. This provides opportunities for multiple use scenarios, especially for situations where a quick and simple connection interface matters.
- Mobile payments: With NFC phones, you can pay with one tap at contactless POS (point of sale) for your purchases, tickets, and taxi rides, or even use store vouchers.
- Keyless access control: Tags, cards, and keychains with embedded NFC chips or phones with a special app installed can serve as electronic keys for secure building access or car door unlock.
- Data sharing: NFC is used for data transfer between active NFC units (peer-to-peer data exchange), like NFC-enabled smartphones, digital cameras, notebooks, etc.
- Authentication: ‘Unlock’ another service (set up communication with another device or network) – connect to Bluetooth headphones, join a WLAN, install an app.
- Quick access to digital information: By tapping your phone on a smart poster or other NFC-embedded item, you can read schedules, download maps, and access any other associated content.
Find out how we built an innovative fan engagement application that relies on NFC technology for one of our clients.
What Are the Benefits of NFC?
The NFC technology has many features that make it so widely adopted:
- Security. NFC facilitates secure and encrypted communication, which is critical for applications that involve sensitive data exchange, like mobile payments. The short range of NFC adds an additional layer of security, minimizing the risk of eavesdropping or man-in-the-middle attacks.
- Convenience. NFC plays a major role in enhancing user experience, enabling users to perform tasks by simply tapping their devices against an NFC tag or NFC reader.
- Passive operation. NFC tags are powered by the reader’s electromagnetic field, which makes them ideal for stickers, posters, packaging, and other battery-less environments.
- Speed. NFC tags have sub-200ms response time, which is fast enough for transit gates, access control, and payments – much faster than QR code scanning, for example
- Versatility. NFC tags come in various forms and can be embedded in stickers, wristbands, or even business cards, making them usable for different applications.
- Reusability. It is possible to reprogram NFC tags multiple times, making them handy for testing, inventory, or reconfigurable environments.
- Compatibility. NFC technology is now supported by all modern smartphones running on Android and iOS platforms and integrates easily with diverse embedded systems, NFC readers, and payment terminals.
- Low cost. The price of NFC tags starts at a few cents when purchased in bulk, making it super-affordable for mass deployment in any application domain and business stage.
Types of NFC Tags and Their Applications
If you try surfing the net in search of an NFC tag for your solution, you will come across a wide range of options. So, before we move on to discussing how to program NFC chips, let’s clarify their differentiating features, capabilities, and purposes.
The NFC ecosystem is largely built on five tag types (as defined by the NFC Forum) and several proprietary and secure chip families, each suited for different applications.
The NFC Forum is a non-profit industry consortium founded in 2004 by Sony, NXP Semiconductors, and Nokia, aiming to standardize and advance the NFC technology. The organization differentiates the types of NFC tags by their memory structure, communication protocol, and data access methods, with all of them supporting NDEF (NFC Data Exchange Format) to varying extents:
- NFC Type 1: read/write tags that can be easily programmed, ideal for simple applications like URL redirection or contact information sharing.
- NFC Type 2: offer more memory, often used for marketing purposes, such as linking to promotional content or social media.
- NFC Type 3: used primarily in Japan and are compatible with Sony’s FeliCa technology, commonly utilized in transit systems and payment applications.
- NFC Type 4: support larger data storage and used for secure applications, including mobile payments and access control.
- NFC Type 5: relatively new and ISO 15693-compliant, primarily used in industrial use-cases and offer extended read ranges as compared to other tag types.
Also, there are proprietary NFC chip families that go beyond basic tags, offering cryptographic support, multiple applications, and high configurability.
- MIFARE Family by NXP: widely adopted globally in transportation, access control, and smart city applications. These chips follow the ISO/IEC 14443 standard, ranging from simple to highly secure products.
- NTAG Series by NXP: designed for cost-effective, general-purpose NFC applications, widely used for consumer interaction, product tagging, and tap-to-launch actions. They are fully compliant with the NFC Forum Type 2 or 4 tag standards and work seamlessly across Android and iOS platforms.
- ICODE by NXP: optimized for inventory and asset tracking in industrial and library systems. Designed for Type 5 NFC tags, they use the ISO/IEC 15693 standard, which allows for longer-range reading than traditional NFC (up to 1.5 meters) and offers high memory and durability, making them ideal for high-volume scanning environments.
- FeliCa by Sony: high-speed, secure, and widely adopted in Japan and parts of Asia, particularly for transit and mobile payments. It uses the ISO/IEC 18092 communication standard and supports fast, secure transactions with low latency.
- ST25 by STMicroelectronics: competing with the ICODE family, they support dual interface (RF + I2C), enabling devices to be configured or updated over NFC. Energy harvesting and Fast Transfer Mode features make them ideal for low-power IoT environments in use cases like smart packaging, device pairing and configuration.
NFC chip types also may come in different form factors:
- Cards typically come in ISO/IEC 7810 ID-1 format (same as credit cards), are commonly used for access control, transit cards, loyalty/membership, student or employee ID cards, and cashless payments. This type of NFC tags may support printing and visual branding (photo ID, logos, QR codes).
- Tags/Stickers are thin, adhesive-backed, made from flexible materials, and available in various shapes and sizes. This makes them ideal for marketing, product labeling, and asset tracking. They can be printed with brand graphics or encoded with data like URLs, NDEF messages, or anti-counterfeit signatures. Also can be disposable or tamper-evident.
- Embedded Chips serve for PCBs and wearables and may be in bare dies, chip-on-board (CoB), or surface-mount packages. They are designed for integration directly into PCBs of IoT devices, wearables, industrial machines, or smart appliances. These often support dual interfaces, like NFC + I²C/SPI, enabling offline configuration or diagnostics via a smartphone tap.
- Rings, Smart Watches, and Mobile Devices with embedded NFC chips are mostly used in contactless payment, transit access, door unlocking, and health data sharing. While wearables use miniaturized, durable chips, smartphones integrate full NFC controllers with secure elements for versatile use.
- Secure Elements like embedded Secure Element (eSE), SIM-based (UICC), Host Card Emulation (HCE) are tamper-resistant hardware components or secure environments within mobile devices, used to store sensitive credentials, such as those used in payments or government ID systems.
Each type of NFC chips has unique features and limitations, making it crucial to choose the right one based on the intended application. For instance, NFC Type 4 tags are preferred for payment systems due to their enhanced security features, while Type 1 tags may suffice for basic data sharing tasks. Embedded in various materials, such as stickers, wristbands, business cards, etc., NFC chips allow versatile integration into everyday objects. This adaptability has led to innovative uses in industries ranging from retail to healthcare, where NFC technology can streamline processes and enhance user experiences.
Tools You Need for NFC Programming
Programming NFC tags requires specific tools and software to ensure successful implementation. Thus, in this section, we briefly describe the essential tools you will need for NFC programming.
NFC-enabled reader/writer (hardware)
The main thing you will need is a device that can write data to NFC tags and chips and read it from them. The most common hardware used to program NFC tags are mobile Android and iOS devices that support the NFC technology and have the NFC feature enabled in the settings. In some cases, engineers may use USB NFC Readers (ACR series, Omnikey, Identiv) for PC-based tag initialization, provisioning, or desktop applications or development boards for embedded device programming.
NFC tags
You will need to purchase blank or rewritable NFC tags, making sure they are not locked or permanently written. The type of NFC tags you will program should correspond to your application requirements. Consider factors like memory capacity, security features, and form factor. For example, the most common NTAG213, NTAG215, and NTAG216 tags are inexpensive and support NDEF; NTAG424 DNA tags support cryptography, making them more secure; MIFARE Ultralight / DESFire are more advanced and require authentication keys.
NFC tag writer app
If you decide to use mobile devices to program your NFC chips or tags, you can use various Android and iOS applications that enable NFC tag programming through a user-friendly interface. Examples include NFC Tools for Android and iOS, MIFARE SDK Tools and NXP TagWriter for Android, and even core NFC-enabled custom apps from iOS that allow limited write to NFC Type 1–5 tags.
Also, there are desktop tools for programming NFC tags that work with USB NFC readers. There’s an NFC Tools app for PC that offers a GUI and enables NDEF read/write. For enterprise-grade bulk NFC provisioning, developers use GoToTags NFC Encoder.
SDKs and Libraries
There are also development kits and libraries that are best for NFC programming on each platform. For Android, you can use Android NFC APIs, NXP MIFARE SDK (for working with MIFARE DESFire, Ultralight, and NTAG) or TapLinx SDK (a more modern alternative to MIFARE SDK from NXP). Meanwhile, iOS has more limits. It relies on Core NFC only starting from iOS 13, plus it provides limited writing features, supporting just a few tag types and giving no access to low-level operations.
Development environment
For advanced programming, a development environment such as Android Studio for Android or Xcode for iOS may be necessary. These platforms offer extensive libraries and APIs for integrating NFC functionality into your applications.
How to Program NFC Tags on Android & iOS?
Programming NFC tags on Android and iOS involves a few straightforward steps. Below, our mobile development experts provide a general guide for both platforms.
Android
You can program NFC tags on Android with two different approaches: using NFC Tools with no coding or by using your own Android app. While the NFC Tools app is enough for some small tasks, it won’t provide the security and scalability you can achieve with your custom Android app. Thus, here, we provide the instructions for programming your NFC tags using your own Android app written in Kotlin.
- Start by creating a new project or opening an existing project in Android Studio.
The Android system is permission-based, so to be able to use NFC in an app, you need to declare the required permission. The NFC events dispatch works starting from Android API level 10. Thus, in AndroidManifest.xml file, declare the following:
<uses-permission android:name="android.permission.NFC" />
If you want your app to be available on Google Play only for devices that have NFC hardware, then you need to add the following in the manifest:
<uses-feature android:name="android.hardware.nfc" android:required="true" />
If NFC functionality is not crucial to the app, then you can omit this <uses-feature> line. But make sure you check if NFC is available at runtime.
- Next, you need to Enable foreground dispatch in your Activity:
val intent = Intent(this, javaClass).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP)
val pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_MUTABLE)
val filters = arrayOf(IntentFilter(NfcAdapter.ACTION_TAG_DISCOVERED))
nfcAdapter.enableForegroundDispatch(this, pendingIntent, filters, null)
- In onNewIntent(), handle the tag:
override fun onNewIntent(intent: Intent) {
val tag = intent.getParcelableExtra<Tag>(NfcAdapter.EXTRA_TAG)
val ndef = Ndef.get(tag)
if (ndef != null) {
val message = NdefMessage(arrayOf(
NdefRecord.createTextRecord("en", "Hello NFC!")
))
ndef.connect()
ndef.writeNdefMessage(message)
ndef.close()
}
}
- Deploy the app and tap a tag when prompted.
iOS
As we’ve already mentioned, in contrast with the Android systems, iOS has some limitations:
- iOS can read NDEF tags reliably only starting with iOS 13+
- Writing is possible only for certain tag types (e.g., NTAG213/215/216)
- It only works in a foreground session (user must initiate scan)
Thus, for programming an NFC tag with iOS, you will need an iPhone with iOS 13 and higher, Core NFC, Xcode, and Swift, and a type 2 or 4 NFC tag. Here's the workflow:
- To use NFC on iOS, you must declare required entitlements and a usage description in your app’s Info.plist:
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>NDEF</string>
</array>
<key>NFCReaderUsageDescription</key>
<string>We use NFC to write to tags</string>
This grants your app permission to initiate NFC NDEF sessions and displays the usage description as a system alert when NFC is first accessed. Without this, NFC sessions will fail to start or will be rejected during App Store review.
- Now, we need to define an NFC handler class that manages the session lifecycle, tag detection, and writing logic:
class NFCWriter: NSObject, NFCNDEFReaderSessionDelegate {
var session: NFCNDEFReaderSession?
func beginSession() {
session = NFCNDEFReaderSession(delegate: self, queue: nil, invalidateAfterFirstRead: false)
session?.alertMessage = "Hold your iPhone near the NFC tag"
session?.begin()
}
func readerSession(_ session: NFCNDEFReaderSession, didDetect tags: [NFCNDEFTag]) {
guard let tag = tags.first else { return }
session.connect(to: tag) { error in
tag.queryNDEFStatus { status, capacity, error in
let payload = NFCNDEFPayload.wellKnownTypeTextPayload(string: "Hello from iOS!", locale: Locale(identifier: "en"))
let message = NFCNDEFMessage(records: [payload!])
tag.writeNDEF(message) { error in
if error != nil {
session.invalidate(errorMessage: "Write failed")
} else {
session.alertMessage = "Write success!"
session.invalidate()
}
}
}
}
}
func readerSession(_ session: NFCNDEFReaderSession, didInvalidateWithError error: Error) {
print("Session ended: \(error.localizedDescription)")
}
}
This step Initializes the NFC session and starts scanning, handles tag detection and writes a basic NDEF text payload. Also, this enables the session to end with appropriate success or error messages.
- In your view controller or SwiftUI interface, call beginSession() when the user taps a button:
let writer = NFCWriter()
@IBAction func writeTagButtonTapped(_ sender: UIButton) {
writer.beginSession()
}
This way, you ensure NFC scanning is user-initiated, following the iOS requirement, and the reader session launches and displays Apple’s native NFC scanning prompt.
How to Program an NFC Tag for Payments
Programming NFC tags for payment applications requires additional considerations to ensure security and compatibility. This involves multiple layers: secure tag hardware, backend integration with a payment provider, encrypted payload handling, and a smooth user experience. So in this section, we provide a guide on how to set up an NFC tag for payments.
- Tag selection.
We recommend selecting an NFC Type 4 tag, as they are designed for secure transactions. They support ISO/IEC 14443-4 protocol, file-based access, AES/3DES encryption, secure session authentication, and anti-cloning features (like SUN — Secure Unique NFC message).
- Integration with a payment processing service (Google Pay or Apple Pay).
Payment data is not stored on the tag. The tag is used as a token trigger or identifier, which the mobile app or terminal resolves through a secure backend. For Google Pay, you need to use the Android HCE (Host-based Card Emulation) on Android. For Apple Pay – embedded Secure Element, which is not programmable via the NFC tag. Alternatively, you can handle wallet logic and server-based transaction processing in your app.
- Tag programming
Ensure that sensitive payload data (e.g., token or reference ID) is encrypted and that the tag is programmed to comply with payment security standards. Make sure you don’t store PAN or card data on the tag and use NDEF Records with dynamic URL or app-launch instructions. As an option, in certain tags, you can use SUN message for anti-cloning.
- Quality assurance
After programming, conduct thorough testing to ensure that the NFC tag functions correctly at point-of-sale terminals and that transactions are processed securely. Make sure that:
- The NFC tap triggers the app or POS terminal
- The token is received and decrypted correctly
- The server validates the token and completes the transaction
- The tag resists replay attacks or cloning
- The payment experience is under 1 second
Tools you can use for testing your NFC payment workflow include NFC Tools Pro, Terminal simulators (Square Reader SDK, Verifone test mode). Consider backend logging for the token lifecycle.
- User experience
User experience should be seamless, allowing users to complete transactions with a simple tap of their device against the NFC tag. Payment should be triggered instantly and users should get clear UI feedback (“payment complete” screen, etc.) If you don’t have a dedicated app, make sure a secure payment web page opens properly.
Advanced Tips From Our Programmers
As any software programming, NFC setup has its nuances and challenges. Thus, for those looking for some extra recommendations on NFC programming, we’ve prepared some important tips.
Utilize Foreground Dispatch
Foreground dispatch ensures that your app gets first access to an NFC tag when it's active. Without it, the system may prompt the user to choose from other NFC-capable apps (like Google Wallet), or worse, ignore your app entirely. Implementing foreground dispatch in Android can help prioritize your app for NFC intents, ensuring that it receives the tag data first when in the foreground. You must disable foreground dispatch in onPause() or the system may throw exceptions. Keep in mind that this only works while the activity is resumed and visible.
Check NFC Support
Some devices (especially budget or older ones) don’t support NFC, and others might have it disabled. Your app should gracefully handle both cases. So always verify whether the device supports NFC and if it is enabled in the settings: prompt user to open NFC settings with startActivity(Intent(Settings.ACTION_NFC_SETTINGS)) and disable NFC features in the UI if NFC is not available. This can prevent crashes or unexpected behaviors during implementation.
Secure Sensitive Data
NFC tags can be read by any device with an NFC reader, which makes them vulnerable to eavesdropping or cloning if you store plaintext sensitive data. Thus, when programming NFC tags for payments or authentication, never store sensitive data like user credentials, payment tokens, or API keys in plaintext. We recommend encrypting data before writing it to the tag and authenticating the tags using NFC chips with secure features (Secure Unique NFC (SUN), file-level AES authentication).
Explore Peer-to-Peer Mode
As you already know, NFC is not just for reading tags – it also supports device-to-device (peer-to-peer) communication applicable for contact sharing, app content syncing, or triggering actions in nearby devices. So, you can leverage NFC's peer-to-peer mode for non-trivial applications and features that can blow your users’ minds and attract more attention to your software product.
Consider User Interaction on iOS
Unlike Android, iOS doesn’t allow background NFC tag detection unless certain system apps are running (like Apple Wallet): it requires a user-initiated action (e.g., button press) to start the NFC session. Also, the NFC session times out after ~60 seconds, and only NDEF-formatted tags are supported for reading. Keep these nuances in mind while designing UI and make sure your app guides the user to scan a tag within a specific UI flow.
Conclusion
Programming NFC tags is a powerful way to enhance user experiences and streamline interactions in various applications, from payments to data sharing. Understanding the types of NFC tags, the tools required, and the programming process on both Android and iOS platforms is essential for successful implementation. By following best practices and incorporating advanced techniques, developers can create innovative solutions that leverage the capabilities of NFC technology.
Take Your NFC Programming to the Next Level with Axon
If you're inspired by the possibilities of NFC tags and want to integrate this technology into your business solutions, Axon is here to help. Our expertise in full-cycle software development ensures that your NFC-enabled applications are not only innovative but also tailored to drive your business forward. From concept to maintenance, we deliver custom software solutions that align with your unique needs. Ready to transform your business ideas into reality? Contact us at Axon, and let's create something exceptional together.
FAQ
Yes, you can reprogram NFC tags as long as they haven’t been permanently locked. Writable tags can be erased and updated multiple times using supported NFC apps or code until they are explicitly made read-only.
You can check a tag’s lock status using NFC writing apps like NFC Tools or programmatically by reading the tag’s lock bytes or metadata. If locked, attempts to write to the tag will either fail or return an error code.
Yes, NFC tags can be programmed for multiple uses, such as linking to a website, sharing contact information, or initiating a payment process, depending on the tag's memory capacity and type.