Change the payload of the last record.


ndeftool payload [OPTIONS] DATA
ndeftool pl [OPTIONS] DATA


The payload command either changes the current last record’s data (NDEF Record PAYLOAD) or, if the current message does not have any records, creates a record with the given record data. The changed record is verified to successfully encode and decode unless disabled with -x.

The data string may contain hexadecimal bytes using xNN notation where each N is a nibble from [0-F].


-x, --no-check

Do not check decoding after type name change.


Show this message and exit.


Create a plain text payload record.

$ ndeftool payload 'Hello World' typename 'text/plain' print
NDEF Record TYPE 'text/plain' ID '' PAYLOAD 11 byte '48656c6c6f20576f726c' ... 1 more

Create an NFC Forum Text record with language code and content.

$ ndeftool payload '\x02enHello World' typename 'urn:nfc:wkt:T' print -l
NFC Forum Text Record [record #1]
  content    Hello World
  language   en
  encoding   UTF-8

Create a record with a payload that does not match the record type. The first command creates an NFC Forum Text Record with language code identifier and text content. The second command then replaces the payload with just the text and would make decoding fail.

$ ndeftool text 'Hello World' payload -x 'Hello World' print -l
Record [record #1]
  type       urn:nfc:wkt:T
  data       b'Hello World'