How-to · Intermediate · 3 min read
NFC Readers and Tags
PN532, NTAG Stickers and Reading UIDs With Arduino
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
NFC works at 13.56 MHz and lets a reader talk to tags and phones within a few centimetres. The PN532 is the popular reader chip: it supports I2C, SPI and UART, reads MIFARE and NTAG tags, and can write NDEF data such as a web link. NTAG213 holds 144 bytes, NTAG215 504 and NTAG216 888. Do not rely on a tag's UID for security.
Key specs at a glance
- Frequency
- 13.56 MHz, ISO 14443A and NFC
- PN532 interfaces
- I2C, SPI or UART (HSU), chosen with switches or jumpers
- Tags
- NTAG213 (144 bytes), NTAG215 (504), NTAG216 (888), MIFARE Classic
- Range
- A few centimetres with the standard antenna
- Supply
- 3.3 V or 5 V on breakout boards; check the module
- Phones
- Most Android phones and iPhones read NFC tags with NDEF data
PN532 or RC522?
Both read 13.56 MHz tags. The PN532 does more.
| Reader | Interfaces | Strengths | Limits |
|---|---|---|---|
| PN532 | I2C, SPI, UART | Reads and writes NDEF, works with phones, peer-to-peer and card emulation | Costs more |
| RC522 | SPI (some UART/I2C) | Cheap, easy for learning UIDs; see RC522 | No phone card emulation, fewer features |
| PN5180 | SPI | Supports ISO 15693 and longer range | More complex |
- PN532
- Interfaces:
- I2C, SPI, UART
- Strengths:
- Reads and writes NDEF, works with phones, peer-to-peer and card emulation
- Limits:
- Costs more
- RC522
- Interfaces:
- SPI (some UART/I2C)
- Strengths:
- Cheap, easy for learning UIDs; see RC522
- Limits:
- No phone card emulation, fewer features
- PN5180
- Interfaces:
- SPI
- Strengths:
- Supports ISO 15693 and longer range
- Limits:
- More complex
Reading a tag UID
Set the PN532 to I2C mode, connect SDA, SCL, 5 V and ground, and use the Adafruit PN532 library.
#include <Wire.h>
#include <Adafruit_PN532.h>
Adafruit_PN532 nfc(-1, -1); // I2C, no IRQ or reset pins
void setup() {
Serial.begin(115200);
nfc.begin();
if (!nfc.getFirmwareVersion()) { Serial.println("PN532 not found"); while (1); }
nfc.SAMConfig();
Serial.println("Hold a tag near the reader");
}
void loop() {
uint8_t uid[7], len;
if (nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &len)) {
Serial.print("UID:");
for (uint8_t i = 0; i < len; i++) { Serial.print(" 0x"); Serial.print(uid[i], HEX); }
Serial.println();
delay(1000);
}
}Security and good practice
A tag's UID can be cloned, and MIFARE Classic keys can be recovered. Use tags for convenience features such as launching a page, logging in a classroom or tracking inventory, not for door locks or payments unless you use secure cards (such as DESFire) with properly managed keys. For phone-readable tags, write a URL as NDEF so the phone opens it on tap.
Try it: Frequency wavelength calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Leaving the PN532 mode switches in the wrong position.
- Expecting range of more than a few centimetres.
- Putting a normal sticker directly on metal.
- Using UIDs as passwords.
- Writing more data than the tag capacity.
Frequently asked questions
Can a phone read my NFC tag?
Yes, if you write the data as NDEF. Most Android phones and recent iPhones read NTAG stickers.
Which NTAG should I buy?
NTAG213 for URLs, NTAG215 for more data, NTAG216 for the most memory.
Is NFC the same as RFID?
NFC is a type of 13.56 MHz RFID with extra features such as phone interaction.
Can the PN532 emulate a card?
It has card emulation features in some modes, but support varies and is limited.
Does it work with ESP32?
Yes, over I2C, SPI or UART with the same Adafruit library.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 7 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.




