Back to guides

Is Your Locked NFC Tag Really Read-Only? How to Check

A tag that refuses to write may be locked. Here is how to check read-only status on Android, iPhone and in an app, and why locking is usually permanent.

Published

If your NFC tag refuses to take new data, check its read-only status before you blame the app. Android reports it through isWritable(), iPhone reports it as a readOnly NDEF status, and most tag apps show it on a read screen. If it says read-only, treat the lock as permanent.

Why a tag can be read-only

The NFC Forum says Type 2 tags are read and re-write capable, but users can configure them to become read-only. That "configure" step is the lock. It comes in two flavors.

A soft lock is a flag in the capability container (CC) that tells readers the tag is read-only. A hard lock goes further and sets lock bits in the chip's memory, which block writes at the chip level. Android's makeReadOnly() does both: per the Android Ndef reference, it sets the CC field to read-only and, where possible, permanently sets the lock bits to prevent any further modification of the memory.

So "locked" can mean different things, depending on how the tag was locked and which chip is inside. If you are comparing chips, our guide on how common tag chips compare covers the differences.

Check on Android

Android's Ndef class gives you three methods that matter here:

  • isWritable() checks whether the tag can currently be written. NFC Forum tags can be in a read-only or a read-write state, and this tells you which one you have.
  • canMakeReadOnly() tells you whether the tag supports being locked at all.
  • makeReadOnly() actually locks it.

Use the first two to inspect a tag. Don't call makeReadOnly() as a test: the Android documentation describes the operation as irreversible. If isWritable() returns false, the tag is read-only and writes will fail.

Check on iPhone

Core NFC exposes the same information through queryNDEFStatus. It returns one of three values: readWrite, readOnly, or notSupported. Apple describes NFCNDEFStatus.readOnly as a tag that supports reading NDEF message data only. Core NFC's writeLock call is the one that changes a tag to read-only, which stops future writes.

iOS is more limited than Android here. Core NFC works through NDEF and a set of supported tag types, so a tag that reports notSupported isn't necessarily locked. It may simply not be NDEF-formatted.

Check with an app

You don't need to write code. Most tag tools show the lock state as soon as you scan. WakDev's troubleshooting guide tells users to confirm the tag isn't locked by looking at the Read tab, and adds that if the tag is locked, you won't be able to write on it.

NFCore reads and inspects tags on iPhone, and the Android version does the same, so you can scan a tag and look at its details before you try to overwrite anything.

When a tag is not what it claims

Sometimes a write fails for reasons that have nothing to do with locking. Unmarked bulk tags can use a different chip than the listing says, and a different chip can behave differently. If a batch of tags acts strangely, read how to spot a counterfeit NTAG chip before you order more.

Can a locked tag be unlocked?

Assume not. Android's documentation calls makeReadOnly() irreversible, and a reply in the NXP Community forum says lock bits can be set to 1 but not set back to 0. That is a community report rather than a datasheet statement, so treat it as strong guidance, not a guarantee.

In practice, if a tag is locked, write the data to a new tag. And before you lock one of your own, scan it and test the content first. You won't get a second chance.

Conclusion

A tag that won't write is locked, not NDEF-formatted, or badly positioned on the phone. Checking isWritable() on Android, the readOnly status on iPhone, or the read screen in an app tells you which in a few seconds. If it is read-only, move on to a fresh tag.

Frequently Asked Questions

Can I unlock a read-only NFC tag?

Usually not. Android's documentation says makeReadOnly() permanently sets lock bits where possible and that the operation is irreversible. A community report says lock bits only go from 0 to 1. Use a new tag.

Why does my tag read fine but refuse to write?

It may be locked, but it may also not support NDEF, or the phone may be losing the connection mid-write. Check the write status first, then try again with the tag held steady.

Does a read-only status mean the data is protected?

No. Read-only means the tag rejects writes. It does not encrypt the data or hide it from anyone who scans the tag.