How to Read and Write NDEF / NTAG Tags with an ACS Reader

How do you write a web link or text to an NTAG tag with an ACS reader? Put the link or text into an NDEF message, wrap it in an NDEF TLV (03, length, message, FE) and write it into the tag's user pages, starting at page 4, one 4-byte page at a time. On an ACR1252U, ACR1552U or ACR122U you can do this in three ways: with the NTAG tab of a BSD utility (no commands), with an ACS tool's Ultralight functions, or by sending the PC/SC Update Binary command FF D6 00 <page> 04 <4 bytes> yourself. Then read the pages back with FF B0 and tap the tag with an NFC phone to check it.

The one rule that matters most: never write pages 0 to 3, the lock pages or the configuration pages, and never turn on password protection. NTAG lock bits and capability container bits can only be set, never cleared, so a wrong write there makes a tag permanently read-only. This guide covers NTAG213, NTAG215 and NTAG216 with URL and text records. It builds on the read-only NTAG check in our MIFARE and NTAG test guide.

Not yet tested by BSD. The commands follow the ACS reader manuals (ACR1252U API manual v1.17, ACR1552U reference manual v1.09, ACR122U API manual v2.04), and the tag layout follows NXP's NTAG213/215/216 data sheet. The BSD utility steps are described from its source code. BSD has not yet recorded hardware results for this page; we will add them after our test session.

NDEF (NFC Data Exchange Format) is the NFC Forum's data format for links, text and other small items that a phone understands when it touches a tag. On an NTAG tag the data sits in three layers, from the outside in:

  1. The TLV block on the tag. NFC Forum Type 2 tags such as NTAG21x keep their data area as a list of blocks, each with a type byte, a length and a value (TLV). Type 03 is the NDEF message. Type FE marks the end and has no length. A new NTAG213 also starts with a block of type 01 (lock control), which tells NFC devices where the extra lock bits are.
  2. The NDEF message. One or more records. A tag that a phone opens with one tap usually holds a single record.
  3. The record. A header byte, a type length, a payload length, the type (for example U for a URI or T for text) and the payload itself.

The TLV length is one byte for messages up to 254 bytes. A longer message, which only fits on an NTAG215 or NTAG216, uses FF followed by a two-byte length. The examples on this page stay well below that.

The record rules come from the NFC Forum's NDEF, URI Record Type Definition, Text Record Type Definition and Type 2 Tag specifications. The NFC Forum sells these documents, so we have checked every byte on this page against the public examples in NXP's NTAG data sheet and ACS's ACR1552U and ACR1252U manuals, which follow the same rules.

NTAG213, NTAG215 and NTAG216 store everything in 4-byte pages, numbered from 0. NXP's data sheet gives this layout:

PagesNTAG213NTAG215NTAG216What is there
0 to 200 to 02 on all three7-byte serial number (UID) with its check bytes, one internal byte, and the two static lock bytes (page 2, bytes 2 and 3). Factory-programmed and write-protected, except the lock bytes.
303 on all threeCapability container (CC): one-time-programmable bits that tell a phone the tag holds NDEF data.
User memory04 to 27 (144 bytes)04 to 81 (504 bytes)04 to E1 (888 bytes)Where the NDEF message goes. The only pages you write.
Dynamic lock bytes2882E2Extra lock bits for page 10h onward. Setting them is permanent.
Configuration29 to 2C83 to 86E3 to E6Mirror and counter settings, AUTH0, ACCESS (including the permanent CFGLCK bit), the 32-bit password PWD and PACK.
Total45 pages135 pages231 pages

The capability container (page 3)

A new tag arrives with page 3 set to E1 10 12 00 (NTAG213), E1 10 3E 00 (NTAG215) or E1 10 6D 00 (NTAG216):

  • E1: the NDEF "magic number". It tells a phone that the tag is formatted for NDEF.
  • 10: the version of the Type 2 Tag mapping (1.0).
  • 12 / 3E / 6D: the NDEF data area size divided by 8, so 144, 496 and 872 bytes. (On the NTAG215 and NTAG216 the NDEF area is slightly smaller than the user memory.)
  • 00: read and write access allowed. NXP's data sheet shows that writing 0F into this byte makes the tag read-only for NDEF, for good.

On a new tag, the user area already holds an empty NDEF message: NTAG213 pages 4 and 5 read 01 03 A0 0C 34 03 00 FE (a lock-control block, then 03 00 for an empty message, then FE). NTAG215 and NTAG216 page 4 reads 03 00 FE 00. Our NDEF read check explains how to recognise these values.

Write only to user pages. Leave everything else alone.

  • Never write pages 0 to 3. Pages 0 and 1 cannot be changed anyway. Page 2 holds the static lock bytes and page 3 the capability container. On both pages NXP's chip combines what you write with what is there using a bit-wise OR, so a bit once set to 1 stays 1. A stray byte can lock pages 3 to 15 for ever, or make the tag read-only for phones.
  • Never write the dynamic lock page (28, 82 or E2). Its bits lock the rest of the user memory, and they are permanent too.
  • Never write the configuration pages (29–2C, 83–86, E3–E6). They hold AUTH0, which turns on password protection from a chosen page, and CFGLCK, which locks the configuration permanently.
  • Never set a password. At delivery AUTH0 is FF, so password protection is off. This guide does not cover passwords: a tag with a forgotten password cannot be written again.
  • Use a spare tag, write one page per command, and read every page back.

Why the lock bits matter (a warning, not a how-to)

NFC tags can be made permanently read-only. That is useful for a poster or a product label that must never be changed, which is why phone apps offer a "lock tag" button. It works by setting the lock bits and the CC access byte described above. The NTAG WRITE command itself accepts pages from 2 up to the last configuration page, so a reader will send a write to those pages if you ask it to. Nothing in the reader stops you. Locking is not covered here, and you should never test it on tags you want to keep.

The ACR1252U and ACR1552U NFC Card Utilities are BSD Infotech's own Windows programs (not ACS software). Their NTAG / Ultralight tab writes a web link or text that phones open on tap, reads the NFC message back, and refuses to write pages 0 to 3 or any page outside the user memory. Reader and card detection are free; reading and writing card data needs a BSD licence key. Download after a one-time email check: ACR1252U utility, ACR1552U utility.

  1. Install the ACS driver and the utility, plug in the reader and place an NTAG tag on it. Expected: the utility identifies the tag (for example NTAG213) from its capability container and opens the NTAG / Ultralight tab.
  2. Click Read Memory. Expected: a page list with pages 0 to 3 labelled (serial number, lock bits, NFC settings) and the size of the user memory. If the tool says the tag is not NFC formatted, page 3 is blank and phones will not read it (see Problems).
  3. Type a link and click Write Link, or type text and click Write Text. The utility builds the URI or Text record, wraps it in the 03 … FE block and writes it from page 4. It then reads the pages back and compares them. Expected: "Link written: …". If the read-back differs, it reports that the tag may be write-protected.
  4. Click Read NFC Message. Expected: "Link: https://…" or "Text: …".
  5. Tap the tag with a phone (see Read back and check on a phone).

The tab also has Erase NFC Message, which writes an empty message, and a single-page write for test bytes (user pages only). The utility writes the message from page 4. On an NTAG213 that replaces the lock-control block that NXP puts there at delivery; the manual route below keeps it.

ACS's free Smart Card and Reader Tool has MIFARE Ultralight and Ultralight C widgets that read and write 4-byte pages. ACS does not list NTAG among its supported cards, and ACS's SDK pages for the ACR1252U and ACR1552U say the tool includes NFC and NDEF tools, but ACS does not publish how those NDEF screens work. So what we can say today is:

  • If the Ultralight widget accepts your NTAG tag, prepare the page bytes yourself as shown in the URL example below and write them page by page, from the first page you need, never below page 4.
  • If your reader's widget offers an NDEF tool, try it on a spare tag and read the pages back to see what it wrote.
  • If the widget does not accept the tag, use the tool's APDU console or Route 3.

Where to get the tool, its widgets and a read-only NTAG walk-through are in our Smart Card and Reader Tool guide. ACS's download link goes through a short registration form.

NTAG tags have no MIFARE Classic key. The ACS manuals say Ultralight memory needs no authentication, so you do not send FF 82 or FF 86. Two pseudo-APDUs do everything. The reader turns them into the tag's own READ and WRITE commands:

CommandBytesWhat the ACS manuals say
Read BinaryFF B0 00 <page> 10Returns 16 bytes (4 pages) from the page you name, then 90 00. 16 bytes is the Ultralight maximum on the ACR122U and ACR1252U.
Update BinaryFF D6 00 <page> 04 <4 bytes>Writes one 4-byte page. All three manuals give the same Ultralight example, page 04 with 00 01 02 03: FF D6 00 04 04 00 01 02 03.
ReaderWrite size for Ultralight/NTAGFailure code
ACR122U4 bytes (one page) per command63 00
ACR1252U4 bytes for Ultralight63 00
ACR1552UA multiple of the page size. ACS advises not to write several pages in one command when a security page is involved. We write one page at a time on every reader.6X XX

The ACS manuals describe the Ultralight family and do not name NTAG21x separately. NTAG uses the same READ and WRITE commands as Ultralight, which is why these commands are expected to work, but BSD has not yet confirmed them on each reader. The ACS Script Tool is the easiest way to send them one line at a time.

Here is the link https://www.bsdinfotech.com as an NDEF URI record, byte by byte. (Our Smart Card and Reader Tool guide decodes a similar link that uses the "https://" prefix; this one uses "https://www.".)

D1 01 10 55 02 62 73 64 69 6E 66 6F 74 65 63 68 2E 63 6F 6D
BytesFieldMeaning
D1Record headerBinary 1101 0001: MB = 1 (first record), ME = 1 (last record), CF = 0 (not chunked), SR = 1 (short record: one-byte payload length), IL = 0 (no ID field), TNF = 001 (NFC Forum well-known type).
01Type lengthThe type is 1 byte long.
10Payload length16 bytes: the prefix code plus 15 characters.
55TypeASCII "U": a URI record.
02URI prefix codeStands for "https://www.", which the phone adds back. Other common codes: 00 no prefix, 01 "http://www.", 03 "http://", 04 "https://", 05 "tel:", 06 "mailto:".
62 73 … 6DRest of the URI"bsdinfotech.com" in ASCII/UTF-8: b=62 s=73 d=64 i=69 n=6E f=66 o=6F t=74 e=65 c=63 h=68 .=2E c=63 o=6F m=6D (15 bytes).

The record is 4 header bytes + 16 payload bytes = 20 bytes (hex 14). On the tag it becomes the TLV 03 14 + the 20 record bytes + FE = 23 bytes.

How we checked it. NXP's NTAG213 data sheet shows the same structure for its own example link, http://www.nxp.com/index.html?m=…: 03 28 D1 01 24 55 01, followed by the text. There, 01 is the "http://www." code and 24 (36) is 1 prefix byte + 35 characters. ACS's ACR1552U manual uses 02 for "https://www." with acs.com.hk, and the ACR1252U manual uses 01 for "http://www.". (In the ACR1552U example the record line shows 02 but the tag line below it shows 01. Both codes are valid, but they produce different links.)

Page layout on an NTAG215 or NTAG216

Write from page 4. The last page is padded with 00:

Page 04: 03 14 D1 01
Page 05: 10 55 02 62
Page 06: 73 64 69 6E
Page 07: 66 6F 74 65
Page 08: 63 68 2E 63
Page 09: 6F 6D FE 00

Page layout on an NTAG213 (keeping NXP's lock-control block)

NXP's own example keeps the delivered 01 03 A0 0C 34 block in front of the NDEF message, so page 4 is not written at all:

Page 04: 01 03 A0 0C   (as delivered, do not write)
Page 05: 34 03 14 D1
Page 06: 01 10 55 02
Page 07: 62 73 64 69
Page 08: 6E 66 6F 74
Page 09: 65 63 68 2E
Page 0A: 63 6F 6D FE

A text record, for comparison

The text "Hello" in English is D1 01 08 54 02 65 6E 48 65 6C 6C 6F: header D1, type length 1, payload 8 bytes, type 54 ("T"), a status byte 02 (bit 7 = 0 for UTF-8, low six bits = language code length 2), the language code "en" (65 6E), then "Hello". The message is 12 bytes, so the TLV is 03 0C … FE. Pages are filled the same way as above.

Language: ACS Script Tool 5 script (one command per line; any tool that sends PC/SC APDUs works). Prerequisites: ACS driver installed, an ACR1252U, ACR1552U or ACR122U, and a spare NTAG215 or NTAG216 on its delivery settings. For an NTAG213, use the second layout above (pages 05 to 0A).

Not yet tested on hardware. These commands follow the ACS manuals' Read Binary and Update Binary formats and NXP's NTAG memory map. BSD will run them on its ACR1252U, ACR1552U and ACR122U with NTAG tags and replace this note with the results.

  1. Check that it is an NDEF tag. FF B0 00 00 10 reads pages 0 to 3. Expected: 16 bytes + 90 00, with page 3 (bytes 13 to 16) = E1 10 3E 00 or E1 10 6D 00. Stop if it is not E1, or if the last byte is not 00 (the tag is read-only).
  2. Write the body first, then the length. Page 4 currently says "empty message" (03 00 FE 00). Leave it like that while you write pages 5 to 9, and write page 4 last. If the write is interrupted, the tag still holds a valid empty message instead of a broken one.
  3. Send the writes, one page per line. Expected for each: 90 00.
  4. Read back. FF B0 00 04 10 and FF B0 00 08 10. Expected: the bytes you wrote, then 90 00.
; BSD: write https://www.bsdinfotech.com to a spare NTAG215/216. Not yet tested on hardware.
; Pages 04 to 09 only. Never write pages 00-03, lock or configuration pages.
FF B0 00 00 10 (90 00)
FF D6 00 05 04 10 55 02 62 (90 00)
FF D6 00 06 04 73 64 69 6E (90 00)
FF D6 00 07 04 66 6F 74 65 (90 00)
FF D6 00 08 04 63 68 2E 63 (90 00)
FF D6 00 09 04 6F 6D FE 00 (90 00)
; Last: page 04 holds the TLV header and the length.
FF D6 00 04 04 03 14 D1 01 (90 00)
FF B0 00 04 10 (90 00)
FF B0 00 08 10 (90 00)

Expected result: every line returns 90 00. The first read returns pages 4 to 7 as 03 14 D1 01 10 55 02 62 73 64 69 6E 66 6F 74 65. The second read starts with 63 68 2E 63 6F 6D FE 00 (pages 8 and 9), followed by whatever pages 0A and 0B hold.

If it fails: 63 00 (ACR122U, ACR1252U) or a 6X XX code (ACR1552U) means the tag did not accept the write. Check that the tag is still on the reader, that the page is inside the user memory, and that the tag is not locked or password-protected. Do not retry on pages outside the user area. More in Problems.

To erase the link later, write the delivery content back: FF D6 00 04 04 03 00 FE 00 on an NTAG215/216, or FF D6 00 05 04 34 03 00 FE on an NTAG213. The old bytes after FE stay on the tag, but phones stop reading at FE.

  1. Read with the reader. Read 4 pages at a time from page 4 (FF B0 00 04 10, FF B0 00 08 10, and so on) until you pass the FE. Skip any block that is not type 03, then decode the record as in the table above. The BSD utility's Read NFC Message does this for you.
  2. Remove the tag from the reader. A phone and the reader should not both talk to the tag at the same time.
  3. Tap it with an NFC phone with NFC switched on, holding the tag against the phone's NFC antenna area. Expected: the phone offers to open https://www.bsdinfotech.com, or shows the text. Phones differ in how they show text records; some need an NFC app to display them.
  4. Record the result: tag type, reader, phone model, what the phone showed. Our test-card log has a simple template.

If the phone shows nothing but the reader reads your bytes correctly, compare the bytes with the worked example: a wrong length byte is the most common cause.

What you seeLikely causeWhat to do
No card detected, or no reply at allDriver, service or tag positionCheck the reader first with a UID read; see testing an NFC reader on Windows.
Page 3 reads 00 00 00 00The tag is not NDEF-formatted (for example a plain Ultralight)Phones will not read data from it. Use an NTAG tag sold as NFC Forum formatted. Formatting means writing the one-time CC, which this guide does not cover.
Page 3 ends in 0FThe tag has been made read-onlyIt is permanent. Use another tag.
Write returns 63 00 or 6X XX on a user pageTag moved, page locked by lock bits, or password-protectedHold the tag still and retry once. If it fails again, read pages 0 to 3 and check the lock bytes in page 2 (if the last two bytes of page 2, the static lock bytes, are not 00 00, some pages are locked).
Reads work up to a certain page, then failPassword protection from that page on (AUTH0)The tag belongs to a system with its own password. Do not try to get round it; use your own tag.
Read-back differs from what you wroteWrite not accepted, or the tag left the fieldWrite the page again, then read it back. The BSD utility reports this as "read-back differs".
Reader reads the link, phone shows nothing or "empty tag"Wrong TLV length, missing FE, wrong payload length, or page 4 still says 03 00Recount the bytes against the worked example. The TLV length = record length; the payload length = prefix byte + characters.
Phone opens the wrong address (for example http instead of https)Wrong URI prefix code01 http://www., 02 https://www., 03 http://, 04 https://.
"Too long" in the BSD utilityThe message is bigger than the user memoryNTAG213 holds 144 bytes of NDEF. Use a shorter link or an NTAG215/216.
Script Tool stops on a lineThe reply did not match (90 00)See the error log; our Script Tool guide lists common causes.

Checked on 17 Nov 2026. Commands and response codes are from the ACS manuals; the NTAG memory layout, lock bits and delivery content are from NXP; record bytes were checked against the NXP and ACS examples:

  • NXP, NTAG213/215/216 product data sheet, rev. 3.2: memory organisation, static and dynamic lock bytes, capability container, configuration pages, memory content at delivery, UID mirror example (NDEF URL bytes), WRITE command
  • NXP, NTAG 213/215/216 product page: 144/504/888 bytes user memory, NFC Forum Type 2 Tag compliance
  • NFC Forum, specifications: NDEF, URI RTD, Text RTD and Type 2 Tag (sold by the NFC Forum; not quoted here)
  • ACS, ACR1552U Series Reference Manual v1.09: Update Binary, Appendix A "NDEF Message" (from the ACR1552U downloads page)
  • ACS, ACR1252U Application Programming Interface v1.17: Read and Update Binary, Appendix A (NDEF URI example) (from the ACR1252U downloads page)
  • ACS, ACR122U Application Programming Interface v2.04: Update Binary for MIFARE Ultralight (from the ACR122U downloads page)
  • ACS utility tools page (Smart Card and Reader Tool, Script Tool)

BSD Infotech is an independent ACS supplier and integrator, not the manufacturer. ACS and ACS product names belong to Advanced Card Systems Ltd. MIFARE, MIFARE Ultralight and NTAG are trademarks of NXP B.V. NFC Forum is a trademark of the NFC Forum.

Need NFC tags encoded or an NDEF app built?

Tell us the reader, the tag type and what the tag should open. We help with ACS reader testing, NTAG encoding and NFC application development.