Skip to content
Language: EN

How do you write an NFC tag?

Writing an NFC tag means storing NDEF content on it: a web address, a Wi-Fi credential, a contact card. Any phone with NFC and a writing application can do it in a second. What deserves thought beforehand is what to store, how much fits, and whether to lock the tag afterwards.

What writing actually does

A tag is a small block of rewritable memory. Writing puts bytes into it, arranged according to a format called NDEF so that any compliant reader can make sense of them afterwards.

The operation itself takes a fraction of a second and needs nothing more than a phone held against the tag. What takes thought is everything around it: choosing what to store, checking it fits, and deciding whether the tag should ever be changed again.

What you can put on a tag

A web address is by far the most common, and for good reason: it is short, it works on both platforms, and the content it points at can be changed later without touching the tag.

Beyond that, a tag can hold a contact card, Wi-Fi credentials, a phone number, an email with a prefilled subject, geographic coordinates, plain text, or a custom payload only your own software understands. Each of these is a record type, and the type is what tells a phone what to do rather than merely what it holds.

What a tag cannot hold is anything large. There is no photograph, no document and no video, and the constraint is memory rather than speed.

How much fits

Less than the packaging says, always. Part of the memory describes the tag to readers, the NDEF container adds its own header, and each record costs bytes before its content starts.

For a typical consumer tag this leaves room for a URL and little else, which is exactly why the link and server pattern dominates. Store a short address on the tag, put everything else behind it, and you gain the ability to change the destination for a thousand tags without collecting any of them.

Formatting, and when you need it

Formatting writes the structure that lets a generic reader find content, rather than erasing anything in the way the word suggests. Most tags arrive pre formatted, which is why writing to a new tag usually works with no preliminary step.

When it does not, and a write fails with a complaint about the format, formatting first is the missing action.

Locking, the one step you cannot undo

A tag can be permanently locked so that its content can never be changed again. It is a genuine one way operation performed in software, with no physical trace and no recovery, and it sits as a checkbox next to the write button in most tools.

That placement causes a steady stream of accidents. Lock a tag for a public deployment where substitution is a real risk, and leave it unlocked everywhere else, because the ability to correct a mistake is worth more than the protection in most situations.

Before you lock anything

Verify what you wrote by reading the tag back. A write interrupted partway through can leave content that looks plausible and is not, and locking that state makes it permanent.

All guides in this section

NDEF fundamentals

Record types

Formatting and preparing

Locking and password protection

Bulk writing and production

Copying your own tags

Frequently asked questions

Do I need an application to write a tag?

Yes. Neither mobile operating system exposes writing in its own interface, so a tool is required for writing, formatting and locking. Reading common content works without one.

Can I rewrite a tag as many times as I want?

For practical purposes yes, since the write cycle limit is far beyond what any normal deployment reaches. The exception is a locked tag, which cannot be rewritten at all.

Will a tag I write work on both Android and iPhone?

A web address will. Some record types are handled by one platform and ignored by the other, so anything meant for the public should be tested on both before it is produced in quantity.

What happens if I move the phone away mid write?

The tag loses power and the write stops. It can be left holding partial content that reads as corrupt rather than empty, which is why verifying a write matters more than it appears to.