8000 GitHub - 3liAf/awesome-nfc: Curated NFC tools, libraries and hardware, plus guides and a browser-based tag writer that needs no app install. · GitHub
[go: up one dir, main page]

Skip to content

About

Curated NFC tools, libraries and hardware, plus guides and a browser-based tag writer that needs no app install.

Topics

Resources

Code of conduct

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Awesome NFC Awesome

Tools, libraries, hardware and guides for working with NFC tags and stickers.

NFC tags are cheap passive chips, usually under 20 cents each, that a phone can read and write by touching them. There is a lot of scattered material about them and not much that collects it in one place. This list tries to be that place, with a bias toward things that still work and are still maintained.

Every link here has been checked, and a scheduled job rechecks them weekly. Projects that are archived or dormant are labelled as such rather than quietly dropped, because some of them are still the best option available.

Contents

Guides in this repository

If you have never touched an NFC tag, start with Getting started. It takes about fifteen minutes and assumes nothing. Writing to NFC tags then covers every method in more depth: phone, USB reader, Python, Node and Arduino. NFC formats explained describes what NDEF actually is, which record types exist, and how the byte budget works out in practice.

Two platform notes sit separately, because the differences are annoying enough to deserve their own pages: the Android guide and the iOS guide, the latter covering what iOS can and cannot do and since which version.

The short version of all of it: buy a pack of NTAG215 stickers, install one of the apps below, choose "write", pick a record type, hold the phone against the sticker.

There is also a browser-based writer that needs no install: open the hosted version on an Android phone and write a tag from the browser. It uses the Web NFC API, so it only works in Chrome or Edge on Android, and it needs a secure context. To run the copy in web/ locally, serve it over HTTPS or from localhost:

cd web && python -m http.server 8000

Tag types

Practical differences between the chips you will actually encounter. Usable bytes are lower than raw memory because NDEF has overhead.

Chip Usable NDEF Notes
NTAG213 ~132 bytes Cheapest. Fine for short URLs.
NTAG215 ~492 bytes The sensible default. What Amiibo use.
NTAG216 ~872 bytes Buy if you are writing vCards or long payloads.
MIFARE Ultralight ~46 bytes Common in transit tickets. Tight.
MIFARE Classic 1K ~716 bytes Broken crypto. iPhones cannot read it at all.
MIFARE DESFire EV1/EV2/EV3 multiple KB Real cryptography. Used in access control.

Two things that catch people out: metal behind a tag kills it unless the tag is marked "on-metal", and iPhones cannot read MIFARE Classic because Apple never licensed it.

Libraries

Python

  • nfcpy - The standard Python NFC library. Works with USB readers over PC/SC and libusb, and the documentation is genuinely good.
  • RFIDIOt - Adam Laurie's long-running RFID and NFC toolkit. Older, but a lot of protocol knowledge is encoded in it.

JavaScript and Node

  • nfc-pcsc - The one to use for Node. Talks to ACR122U and similar readers with a sane API.
  • ndef-js - Encode and decode NDEF messages in JavaScript.
  • react-NFC-sample - Small worked example of the Web NFC API in React.
  • Web NFC API - Browser-native reading and writing. Chrome and Edge on Android only.

Android

iOS

  • Core NFC - Apple's framework. Reading since iOS 11, writing since iOS 13.
  • NFCReaderWriter - Swift wrapper covering both reading and writing.
  • VYNFCKit - Parses NDEF payloads into usable objects.

Cross-platform

C

  • libnfc - The foundation almost everything else on Linux sits on.
  • libfreefare - Friendlier card manipulation on top of libnfc.

Mobile apps

Android

  • NFC Tools - The general-purpose choice. Read, write, lock and run tasks.
  • MIFARE Classic Tool - For MIFARE Classic specifically, and open source.
  • NXP TagInfo - The best tag inspector. Tells you exactly which chip you are holding.
  • TagMo - Writes Amiibo data to NTAG215. Sideload only.

iOS

  • NFC Tools for iOS - Same developer as the Android version.
  • Shortcuts - Built in. Automations can trigger on a specific tag, which covers most personal automation with no third-party app at all.

Desktop and CLI tools

  • NFCToolsGUI - Cross-platform GUI for PN532 readers.
  • Proxmark3GUI - Graphical front end for the Proxmark3 client.
  • ACR122U-reader-writer - Minimal read and write utility for the most common USB reader.
  • mfterm - Terminal for working with MIFARE Classic tags.
  • mfdread - Turns MIFARE dumps into something a human can read.

Hardware

  • Proxmark3 - The serious research tool, roughly 70 to 300 US dollars depending on version. The Iceman fork is the firmware everyone actually runs.
  • ChameleonUltra - Card emulation, successor to the ChameleonMini.
  • ChameleonMini - The original emulator.
  • ChameleonMini-rebooted - Maintained fork of the above.
  • Flipper Zero - Does NFC among many other things. Convenient, but not a replacement for a Proxmark.
  • PN532 tutorial - The PN532 breakout costs about five dollars and is the usual starting point for microcontroller projects.

The ACR122U is the default USB reader at around thirty dollars, supported by nearly every library listed here, and limited to 13.56 MHz Type A.

For tags themselves, buy NTAG215 unless you have a reason not to. A hundred stickers costs roughly ten to fifteen dollars. Check three things before ordering: whether it is marked "on-metal" if it is going on anything metallic, whether it is a wet inlay (has adhesive) or dry inlay (does not), and whether the listing names the actual chip. A listing that only says "NFC sticker 1K" usually means MIFARE Classic, which iPhones cannot read. Beyond stickers you can get cards, keyfobs, wristbands, discs, screws, laundry tags, epoxy tokens and implants.

Embedded and microcontrollers

  • esp-idf-rc522 - RC522 driver for ESP-IDF.
  • NDEF for Arduino - Read and write NDEF from Arduino with a PN532. Dormant, but still the standard choice.
  • mifare_classic driver - Portable MIFARE Classic driver.
  • FPGA-NFC - An NFC reader built in Verilog without a reader chip. Unusual and worth reading.

Projects worth stealing ideas from

Real deployments rather than concepts.

  • tagreader - A small NFC reader designed to sit on a wall and talk to Home Assistant. One of the tidiest NFC hardware projects on GitHub.
  • foqos - iOS app that locks you out of distracting apps until you tap a physical tag. A good example of a tag as a commitment device.
  • OpenSpool - RFID tagging for 3D printer filament so the printer knows what is loaded.
  • RFID-Tag-Guide - Reverse engineering of Bambu Lab's filament tags, with an excellent write-up of the process.
  • nfc2klipper - Connects spool tags to Klipper and Spoolman.
  • metrodroid - Reads public transit cards and decodes the trip history stored on them.
  • TagTuner - Tap a tag to play an album. Physical media for streaming, done properly.
  • WiFiKeyShare - Share WiFi credentials by tag or QR code. Archived, but the reference implementation for WiFi record encoding.

Security research

Included because understanding the attacks is how you choose the right chip. For hardware you own or are authorised to test.

  • mfoc - MIFARE Classic offline cracker, exploiting the nested authentication weakness.
  • mfcuk - The darkside attack, which recovers a key with no known key.
  • crypto1_bs - Bitsliced Crypto-1 brute forcer.
  • miLazyCracker - Wraps the hardnested attack into a single command.
  • magspoof - Samy Kamkar on magnetic stripe and contactless emulation. Adjacent to NFC, and the research is worth reading.

The practical takeaway: MIFARE Classic's Crypto-1 cipher was broken in 2008 and keys can be recovered in seconds. Do not use it for anything that matters. Use DESFire EV2 or EV3 if you need real security, or accept that NTAG chips are open by design and put nothing secret on them.

Specifications

  • NFC Forum - The body that publishes the tag type and NDEF specifications.
  • Web NFC draft - The W3C specification behind the browser API.
  • Web NFC on Chrome - Implementation notes and current browser support.
  • ISO/IEC 14443 - Proximity cards, the standard behind Type A and Type B tags.
  • ISO/IEC 18092 - NFCIP-1, covering peer-to-peer mode.
  • ISO/IEC 15693 - Vicinity cards standard (longer-range 13.56 MHz RFID/NFC, e.g. ICODE).

Tag types 1 through 5 are NFC Forum categories, not chip names. NTAG213, NTAG215 and NTAG216 are all Type 2. DESFire is Type 4. Sony FeliCa is Type 3 and appears mostly in Japan.

Learning

Community

See also

  • awesome-iot - Broader list of Internet of Things projects and resources. NFC sits inside it as one section.

Contributing

Suggestions are welcome. See the contributing guide. The main rule is that links must be live and projects must be either maintained or explicitly labelled as not.

About

Curated NFC tools, libraries and hardware, plus guides and a browser-based tag writer that needs no app install.

Topics

Resources

Code of conduct

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0