Lock Bits
Special memory bits that control read/write access to specific memory blocks. Once a lock bit is set, the corresponding memory block becomes read-only. Lock bits themselves are typically OTP (irreversible).
Lock Bits
Lock bits are special OTP (one-time programmable) memory bits in NFC tags that control read/write access to specific memory blocks. When a lock bit is set to 1, the corresponding memory block or group of blocks becomes permanently read-only. Because lock bits are OTP, this protection is irreversible — once set, the data in the locked pages cannot be modified by any reader, regardless of authentication.
Static vs Dynamic Lock Bits
NFC Forum Type 2 tags (NTAG and MIFARE Ultralight families) implement two layers of lock bits:
Static lock bits (page 2, bytes 2-3 in NTAG 21x): - Control write access to pages 3 through 15 (the first 52 bytes of addressable memory). - Each bit protects a specific page or group of pages. - Bit 0 of byte 2 locks page 3 (capability container). Bits 1-7 and bits 0-7 of byte 3 lock pages 4-15. - Setting the CC lock bit is common practice after writing the final NDEF configuration.
Dynamic lock bits (located after user memory): - Control write access to the remaining user memory pages (page 16 onward). - Each dynamic lock bit typically protects a group of pages (the group size depends on the chip model). - For NTAG 216, the dynamic lock bytes are at pages 226-227, covering pages 16-225.
Lock Bit Behavior
| Action | Result |
|---|---|
| Write lock bit 0 to 1 | Target pages become read-only permanently |
| Write lock bit 1 to 0 | Impossible (OTP behavior) |
| Read locked pages | Always allowed |
| Write to locked pages | Rejected by the chip (NAK response) |
Practical Usage
Lock bits are typically set during the final stage of tag provisioning in manufacturing:
- Write the NDEF message to user memory.
- Configure password protection if applicable.
- Set static lock bits to protect the capability container.
- Set dynamic lock bits to protect the NDEF data area.
After locking, the tag becomes a read-only data carrier. This is standard practice for NFC tags deployed in products, packaging, and signage where the data should never be modified in the field.
Comparison with Password Protection
Lock bits and password protection serve different purposes. Lock bits provide absolute, permanent write protection. Password protection provides conditional access control — the data can still be written by a reader that knows the 32-bit password. For maximum security, both mechanisms can be combined: password-protect the tag during provisioning (for potential firmware updates), then set lock bits only when the tag is finalized for deployment.
Related Terms
Related Content
NFC Tag Types Explained
Getting Started…and authentication applications where Type 2's simple lock bits are insufficient. Type 5 Tags: Long Range Type 5 ( nfc-v )…
How to Read and Write NFC Tags
Getting Started…NDEF message Validate with NDEF Decoder ReadOnlyException Lock bits set Use a different tag Write returns success but read…
NFC Chips Compared
Getting StartedNFC Troubleshooting Guide
Getting Started…Calculator to model write frequency. lock-bits set: Once lock bits are programmed, user memory becomes read-only permanently.…
Python NFC Programming Guide
ProgrammingNFC Security Deep Dive
Security…NDEF tampering Data Low (write-enabled tag) Lock bits, password-protection Replay attack Application Moderate…
Building an NFC-Based Product
Advanced…Best For NTAG213/215/216 2 144 / 504 / 888 B Password + lock bits Consumer goods, marketing NTAG I2C Plus 2 1 / 2 KB…
NFC Write Failures and Recovery
Troubleshooting…the expected byte sequence for comparison. Strategy 3: Set lock bits last Never set lock-bits or otp bits until you have…
Frequently Asked Questions
The NFC glossary is a comprehensive reference of technical terms, acronyms, and concepts used in Near Field Communication technology. It is designed for developers, product managers, and engineers who work with NFC and need clear definitions of terms like NDEF, APDU, anti-collision, and ISO 14443.
Each glossary term is cross-referenced with related NFC chips, standards, and other terms. For example, the term 'AES-128' links to chips that support AES encryption (NTAG 424 DNA, DESFire EV2/EV3), and the term 'ISO 14443' links to all chips compliant with that standard.
Yes. NFCFYI provides glossary definitions in 15 languages including English, Korean, Japanese, Chinese, Spanish, Portuguese, Hindi, Arabic, French, Russian, German, Turkish, Vietnamese, Indonesian, and Thai. Use the language selector in the header to switch languages.