NFC Tag Programming for Beginners: Write URLs, Text & WiFi Credentials
> Key Takeaway: Programming an NFC tag is as simple as choosing a record type (URL, text, WiFi, or vCard), entering your data, and tapping a blank tag with your phone. No coding, no special hardware, and no technical background required.
NFC Tag Programming for Beginners
NFC tags are tiny, rewritable chips that can store various types of data. When someone taps an NFC tag with their phone, the stored data triggers an action — opening a website, connecting to WiFi, saving a contact, or launching an app. In this beginner-friendly guide, you will learn exactly how to write data to NFC tags using your Android phone.
What Can You Write to an NFC Tag?
NFC tags store data in a standardized format called NDEF (NFC Data Exchange Format). NDEF supports several record types:
| NDEF Record Type | What It Does | Typical Size | Example |
|---|---|---|---|
| URI (URL) | Opens a website | 20-100 bytes | https://nfcclone.com |
| Text | Displays plain text | 10-500 bytes | "Meeting Room 3B" |
| WiFi | Auto-connects to a network | 50-150 bytes | SSID + password |
| vCard | Saves a contact | 200-800 bytes | Name, phone, email |
| MIME | Custom app data | Varies | Application-specific |
| Smart Poster | Rich URL with metadata | 50-200 bytes | URL + title + icon |
| Android App Record | Launches an app | 30-80 bytes | Package name |
Understanding Tag Memory
Before you write, make sure your data fits. Here is the usable memory for common tags:
| Tag Type | Usable Memory | Fits URL? | Fits WiFi? | Fits vCard? |
|---|---|---|---|---|
| NTAG213 | 144 bytes | Yes (short) | Yes | Basic only |
| NTAG215 | 504 bytes | Yes | Yes | Yes |
| NTAG216 | 888 bytes | Yes | Yes | Yes (detailed) |
| MIFARE UL | 64 bytes | Yes (very short) | No | No |
Step-by-Step: Writing a URL to an NFC Tag
This is the most common use case — programming a tag that opens a website when tapped.
What You Need
- Android phone with NFC enabled
- A blank NFC tag (NTAG213 or larger)
- NFC Clone app installed
Steps
- Use the full URL including `https://` for maximum compatibility
- NDEF URI records use prefix compression (e.g., `https://www.` is stored as a single byte), so URLs starting with common prefixes use less memory
- If the write fails, make sure the tag is not write-protected or locked
Step-by-Step: Writing WiFi Credentials
This is perfect for sharing your home or office WiFi password. Guests tap the tag and connect instantly — no typing the password.
Steps
Step-by-Step: Writing a vCard (Contact)
Program a tag that saves your contact information when scanned — a digital business card.
Steps
- Full name
- Phone number
- Email address
- Company name
- Website URL
- Job title
Step-by-Step: Writing Plain Text
Sometimes you just need a tag that displays a message — a room number, an instruction, or a label.
Steps
Plain text records include a language code header so the reading device knows the language. This adds 3-5 bytes of overhead.
Common Errors and Troubleshooting
| Error | Cause | Solution |
|---|---|---|
| "Tag is read-only" | Tag was locked after a previous write | Use a new, unlocked tag |
| "Not enough space" | Data exceeds tag memory | Use a larger tag or shorten your data |
| "Write failed" | Tag moved during write | Hold the tag steady for 2-3 seconds |
| "Tag not detected" | Poor NFC antenna contact | Slide the tag slowly to find the sweet spot |
| "Unsupported tag" | Tag is not NDEF-formatted | Format the tag first using NFC Clone |
| "IO Error" | Electromagnetic interference | Move away from metal surfaces |
Can You Rewrite NFC Tags?
Yes, most NFC tags are rewritable by default. You can overwrite the data on an NTAG or MIFARE Ultralight tag as many times as you want (typical endurance is 100,000 write cycles).
However, tags can be permanently locked — once locked, the data cannot be changed. NFC Clone will warn you before locking a tag. Only lock a tag if you are certain you will never need to update the data.
Multiple Records on One Tag
NDEF supports writing multiple records to a single tag. For example, you could store a URL and a text message on the same tag. The reading device will typically act on the first record and display the others.
Keep in mind that multiple records consume more memory due to additional NDEF headers. Plan your data layout before writing.
Next Steps
Now that you know how to program NFC tags, explore these related resources:
- NFC Tag Types Explained — choose the right tag for your project
- NFC Glossary — understand all the technical terms
- Best NFC Tags to Buy in 2026 — where to get quality tags
Ready to start programming? Download NFC Clone free on Google Play and write your first NFC tag in under a minute.
Ready to Clone Your NFC Tags?
Download NFC Clone for free — the easiest NFC tag copier for Android.