If you are building a tap-to-open feature (a digital business card, a membership check-in, a link on a loyalty card), the chip choice and the encoded record matter more than the card artwork. These are the questions I see most often from developers ordering their first batch of NFC cards.
Which chip?
For "tap a phone, open a URL", the common choice is an NXP NTAG21x chip. They are ISO/IEC 14443-A, run at 13.56 MHz, and are NFC Forum Type 2 tags, so both iPhones and Android phones read them without an app.
| Chip | User memory | Practical use |
|---|---|---|
| NTAG213 | 144 bytes | One URL, comfortably |
| NTAG215 | 504 bytes | Longer URLs, a vCard with a few fields |
| NTAG216 | 888 bytes | Full vCard, several records |
A typical profile URL fits in NTAG213 with plenty of room. Only move up if you want to store a vCard on the chip itself instead of linking to one.
Two things are often confused with these:
- 125 kHz proximity cards (EM4100 type) only hold a fixed ID number. Phones can't read them. They are for door readers that already expect them.
- MIFARE Classic 1K is common in access and transit systems. Many phones can read it, but it is not the chip to pick if all you need is a URL.
If you are matching an existing door or POS reader, ask for the reader's spec before you choose. The phone use case and the reader use case often need different chips.
What a URL record looks like
A URL on an NTAG is an NDEF message with one URI record. The record saves space by replacing common prefixes with a one-byte code:
| Code | Prefix |
|---|---|
| 0x01 | http://www. |
| 0x02 | https://www. |
| 0x03 | http:// |
| 0x04 | https:// |
Here is a small Python function that builds the bytes, so you can check how much memory a URL needs before you order:
PREFIXES = { "https://www.": 0x02, "http://www.": 0x01, "https://": 0x04, "http://": 0x03, } def ndef_uri_record(url: str) -> bytes: code, rest = 0x00, url for prefix, c in PREFIXES.items(): if url.startswith(prefix): code, rest = c, url[len(prefix):] break payload = bytes([code]) + rest.encode("utf-8") if len(payload) > 255: raise ValueError("use a long record or a shorter URL") # MB=1, ME=1, SR=1, TNF=0x01 (well-known) -> 0xD1; type "U" record = bytes([0xD1, 0x01, len(payload)]) + b"U" + payload # Type 2 tags wrap the message in an NDEF TLV, then a terminator return bytes([0x03, len(record)]) + record + b"\xFE" data = ndef_uri_record("https://example.com/m/000123") print(len(data), "bytes") # 28 bytes: fits NTAG213 easily That is the whole message the chip needs. Short, unique paths (/m/000123) are better than long query strings: they fit any chip, and you can change where they redirect later without re-encoding cards.
Testing in the browser
On Android Chrome you can read and write tags from a web page with Web NFC (HTTPS only, user gesture required):
async function writeTag(url) { const ndef = new NDEFReader(); await ndef.write({ records: [{ recordType: "url", data: url }] }); } async function readTag() { const ndef = new NDEFReader(); await ndef.scan(); ndef.onreading = ({ serialNumber, message }) => { console.log(serialNumber, message.records[0]); }; } It is useful for checking sample cards. iOS Safari does not support Web NFC, but iPhones still open a URL record when the card is tapped.
Locking and passwords
- Lock bits make the memory read-only permanently. Lock production cards so nobody can rewrite them with a free app, but only after you have tested a sample.
- NTAG21x password protection is a 32-bit password that blocks writes (and optionally reads). It stops casual tampering. It is not strong security, so don't put anything sensitive on the chip.
- Every NTAG has a 7-byte UID. If your system needs to know which card was tapped, put an ID in the URL path rather than relying on reading the UID from a web page, because a phone opening a URL doesn't send the UID.
The data file for the printer
If each card gets a different URL, the printer needs a file that matches the encoding to the printed number. A plain CSV works:
card_number,url 000123,https://example.com/m/000123 000124,https://example.com/m/000124 Keep numbers as text so leading zeros survive (Excel drops them if you open and resave the file). Ask whether they can return a UID list after encoding, so you can map each chip to a record if you ever need it. PlasticCard.nz has a longer write-up on RFID and NFC card options and on variable data printing if you want to read about chip choice and numbering from the print side.
Before you order
- Check the URL length with the function above.
- Test one sample on both an iPhone and an Android phone.
- Keep the antenna area in mind: metallic inks and full metal finishes can reduce read range, so ask before choosing them.
- Lock the chip only after testing.
I work at PlasticCard.nz, a plastic card supplier in New Zealand, and these come up whenever someone orders NFC digital business cards. Corrections from people who encode these at scale are welcome in the comments.
