All Categories

Cart 0 item

Shopping cart 0 item

Mfr Part # Quantity
SUBMIT (0)

Select Language

Current Language

English

  • English
  • Deutsch
  • Italia
  • Français
  • 한국의
  • русский
  • Svenska
  • Nederland
  • español
  • Português
  • polski
  • Suomi
  • Gaeilge
  • Slovenská
  • Slovenija
  • Čeština
  • Melayu
  • Magyarország
  • Hrvatska
  • Dansk
  • românesc
  • Indonesia
  • Ελλάδα
  • Български език
  • Afrikaans
  • IsiXhosa
  • isiZulu
  • lietuvių
  • Maori
  • Kongeriket
  • Монголулс
  • O'zbek
  • Tiếng Việt
  • हिंदी
  • اردو
  • Kurdî
  • Català
  • Bosna
  • Euskera
  • العربية
  • فارسی
  • Corsa
  • Chicheŵa
  • עִבְרִית
  • Latviešu
  • Hausa
  • Беларусь
  • አማርኛ
  • Republika e Shqipërisë
  • Eesti Vabariik
  • íslenska
  • မြန်မာ
  • Македонски
  • Lëtzebuergesch
  • საქართველო
  • Cambodia
  • Pilipino
  • Azərbaycan
  • ພາສາລາວ
  • বাংলা ভাষার
  • پښتو
  • malaɡasʲ
  • Кыргыз тили
  • Ayiti
  • Қазақша
  • Samoa
  • සිංහල
  • ภาษาไทย
  • Україна
  • Kiswahili
  • Cрпски
  • Galego
  • नेपाली
  • Sesotho
  • Тоҷикӣ
  • Türk dili
  • ગુજરાતી
  • ಕನ್ನಡkannaḍa
  • मराठी
HomeBlogRC522 RFID Module: Pinout, Wiring, Arduino & ESP32 Code

IN-STOCK ELECTRONIC COMPONENTS.
FAST QUOTES.

Integrated Circuits, Power Devices & Passive Components
Immediate Sourcing Support

GET QUOTE NOW

RC522 RFID Module: Pinout, Wiring, Arduino & ESP32 Code

Time: August 26th, 2026

Browse: 2,400

The RC522 RC522 RC522 NXP RC522 NXP In Stock: 11386 pcs RFID module is a 13.56 MHz contactless reader and writer commonly used with Arduino, ESP32 and other microcontrollers. The name RC522 usually refers to a breakout board built around NXP’s MFRC522 reader IC. Antenna tuning, interface configuration, and component quality may vary between module manufacturers. It creates a radio-frequency field that powers a compatible passive card or tag, reads the tag’s UID and accesses stored memory when the correct authentication key is available. This article explains the RC522 pinout, specifications, supported tags, read/write process, Arduino and ESP32 connections, example code, measured range, common problems and modern NFC alternatives.

Catalog

RC522 RFID Module

Figure 1. RC522 RC522 RC522 NXP RC522 NXP In Stock: 11386 pcs RFID Module

RC522 RFID Module Pinout

RC522 Pinout

Figure 2. RC522 RC522 RC522 NXP RC522 NXP In Stock: 11386 pcs Pinout

Pin
Name
Function
1
VCC
Supplies power to the module. Connect it to a regulated 3.3 V supply. Do not connect it directly to 5 V.
2
RST
Resets and enables the module. Connect it to a digital GPIO pin on the microcontroller.
3
GND
Provides the ground connection. Connect it to the microcontroller’s GND pin.
4
IRQ
Sends an interrupt signal when a configured RFID event occurs. It is usually not used in basic projects.
5
MISO/SCL/TX
Sends data from the RC522 to the microcontroller in SPI mode. It can also function as SCL for I²C or TX for UART.
6
MOSI
Sends commands and data from the microcontroller to the RC522 in SPI mode.
7
SCK
Supplies the clock signal used to synchronize SPI communication.
8
SS/SDA/RX
Selects the RC522 during SPI communication. It can also function as SDA for I²C or RX for UART.

Most blue RC522 breakout boards are configured for SPI. The MFRC522 IC also supports I²C and UART but using these interfaces may require board-specific solder-jumper or strap changes. Check the module schematic before attempting an I²C or UART connection.

RC522 RFID Module Specifications

Specification
Value
Reader IC
NXP MFRC522
Operating frequency
13.56 MHz
Supported contactless standard
ISO/IEC 14443 A, MIFARE, and NTAG
MFRC522 operating supply
2.5–3.3 V
Maximum VDDA, VDDD and TVDD supply
3.6 V
Host interfaces
SPI, I²C-bus, and serial UART
Maximum SPI data rate
10 Mbit/s
Maximum I²C data rate
400 kBd in Fast mode; 3400 kBd in High-speed mode
Maximum serial UART data rate
1228.8 kBd
Maximum contactless transfer rate
848 kBd
Typical operating distance
Up to 50 mm in Read/Write mode, depending on antenna size and tuning
FIFO buffer
64 bytes for send and receive data
Hard power-down current
5 µA maximum
Soft power-down current
10 µA maximum with RF-level detector enabled
CRC processing
Integrated CRC coprocessor
Timer
Programmable internal timer
Interrupts
Flexible interrupt modes
Self-test
Integrated internal self-test
External crystal frequency
27.12 MHz
Module antenna
Typically an integrated PCB antenna; board-specific rather than an MFRC522 IC specification

Note: NXP lists MFRC52202HN1 as End of Life and recommends CLRC663 plus for new reader designs.

Reference: NXP Semiconductors, MFRC522 - Standard performance MIFARE and NTAG frontend, Product Data Sheet, Rev. 3.9, 27 April 2016, document number 112139.

What Cards and Tags Can the RC522 Read?

The RC522 RC522 RC522 NXP RC522 NXP In Stock: 11386 pcs reads and writes 13.56 MHz ISO/IEC 14443 Type A cards and tags. It works best with MIFARE Classic Mini, 1K and 4K products. The MFRC522 supports these products at the RF level, but available read, write and protection features depend on the tag and software library.

It cannot read 125 kHz tags, ISO/IEC 14443 Type B, FeliCa, ISO/IEC 15693 or UHF tags. Protected cards may allow UID detection but block access to their stored data. The RC522 also does not support normal communication with NFC smartphones.

How the RC522 Reads and Writes RFID Tags

The process begins when the microcontroller tells the RC522 RC522 RC522 NXP RC522 NXP In Stock: 11386 pcs to scan for a tag. After a compatible passive tag responds, the reader performs anticollision to separate multiple responses, obtains the tag’s UID and selects one tag for communication.

RC522 Tag Detection, Authentication, and Data Read/Write Process

Figure 3. RC522 Tag Detection, Authentication, and Data Read/Write Process

Before accessing protected memory, the reader authenticates using the correct sector key. A read operation transfers data from the selected block to the microcontroller, while a write operation sends new data to the block and checks whether the tag accepted it. The RC522 then reports whether the operation succeeded or failed.

RC522 Wiring and Setup with Arduino and ESP32

The Arduino Uno and ESP32 communicate with the RC522 RC522 RC522 NXP RC522 NXP In Stock: 11386 pcs through SPI, but they use different pins and logic levels. Install the MFRC522 library through Arduino Library Manager before uploading the UID-reading sketch in Section 5.3.

The library is frozen and receives only sporadic maintenance. It supports MIFARE Classic cards, but NTAG and MIFARE Ultralight support is partial. It does not support I²C, UART, MIFARE DESFire authentication, smartphone communication, or card emulation.

RC522 Interfacing with Arduino

The Arduino Uno communicates with the RC522 through SPI. Power the module with 3.3 V and connect both devices to a common ground. Because the Uno produces 5 V GPIO outputs, SDA/SS, SCK, MOSI and RST must pass through a 5 V-tolerant logic buffer powered from 3.3 V. On common RC522 boards, the SDA pin functions as SS or chip select in SPI mode.

Arduino Uno and RC522 SPI Wiring

Figure 4. Arduino Uno and RC522 SPI Wiring

Arduino Uno and RC522 Connections

RC522 Pin
Arduino Uno Connection
Function
SDA/SS
D10 through logic buffer
Chip select
SCK
D13 through logic buffer
SPI clock
MOSI
D11 through logic buffer
Data sent to RC522
MISO
D12 directly
Data returned to Arduino
RST
D9 through logic buffer
Reader reset
GND
GND directly
Common ground
3.3 V
3.3 V directly
Module power
IRQ
Not connected
Polling is used

A direct MISO connection commonly works, but an upward level shifter provides stricter worst-case compatibility. The Uno’s 3.3 V pin is limited to 50 mA. If the module becomes unstable, use an external regulated 3.3 V supply with its ground connected to the Arduino ground.

RC522 Interfacing with ESP32

The ESP32 and RC522 use 3.3 V logic, so a level shifter is normally unnecessary. RST is connected to GPIO 22, avoiding GPIO 0 because GPIO 0 affects the ESP32 boot mode. These connections apply to the classic ESP32 DevKit; other ESP32 variants may use different SPI pins.

 ESP32 and RC522 SPI Connections

Figure 5. ESP32 and RC522 SPI Connections

ESP32 and RC522 Connections

RC522
ESP32
SDA/SS
GPIO 5
SCK
GPIO 18
MOSI
GPIO 23
MISO
GPIO 19
RST
GPIO 22
GND
GND
3.3 V
3.3 V
IRQ
Not connected

ESP32-specific settings used by the shared sketch are:

const byte SS_PIN = 5;

const byte RST_PIN = 22;

Serial.begin(115200);

SPI.begin(18, 19, 23, SS_PIN);

Shared RC522 UID-Reading Code

The following sketch automatically selects the pin assignments and SPI initialization for an Arduino Uno or classic ESP32. Open the Serial Monitor at 9600 baud for the Uno or 115200 baud for the ESP32.

#include

#include

#if defined(ARDUINO_ARCH_ESP32)

const byte SS_PIN = 5;

const byte RST_PIN = 22;

const unsigned long SERIAL_BAUD = 115200;

#else

const byte SS_PIN = 10;

const byte RST_PIN = 9;

const unsigned long SERIAL_BAUD = 9600;

#endif

MFRC522 reader(SS_PIN, RST_PIN);

void setup() {

Serial.begin(SERIAL_BAUD);

#if defined(ARDUINO_ARCH_ESP32)

SPI.begin(18, 19, 23, SS_PIN);

#else

SPI.begin();

#endif

reader.PCD_Init();

Serial.println("Place a compatible RFID tag near the reader.");

}

void loop() {

if (!reader.PICC_IsNewCardPresent() ||

!reader.PICC_ReadCardSerial()) {

return;

}

Serial.print("Card UID:");

for (byte i = 0; i < reader.uid.size; i++) {

Serial.print(reader.uid.uidByte[i] < 0x10 ? " 0" : " ");

Serial.print(reader.uid.uidByte[i], HEX);

}

Serial.println();

reader.PICC_HaltA();

delay(500);

}

RC522 Security Limitations

The RC522 is a reader, not a complete security system. A tag’s UID identifies the tag but should not be treated as a secret password because compatible devices may copy or emulate it. Therefore, UID-only systems are unsuitable for payments, secure access control or other applications where impersonation could cause serious harm.

Security also depends on the card technology. MIFARE Classic uses the legacy Crypto1 cipher, which researchers have shown to be vulnerable to practical key-recovery and memory-access attacks. Default keys and keys stored without protection in microcontroller firmware create additional risks. The RC522 is suitable for learning and low-risk identification, but sensitive systems should use a compatible reader and cards with modern mutual authentication, AES encryption, secure messaging and protected key storage, such as appropriate MIFARE DESFire or MIFARE Plus products.

RC522 Read Range: Datasheet Typical Distance and Published Test Results

Datasheet Typical Distance

The NXP MFRC522 datasheet specifies a typical read/write distance of up to 50 mm, depending on antenna size and tuning. This is not a guaranteed range for every RC522 RC522 RC522 NXP RC522 NXP In Stock: 11386 pcs module. Tag design, antenna alignment, supply voltage, electrical noise, and nearby metal can affect the actual distance.

Published Test Results

Wijanarko et al. (2025) tested an ESP32-based access-control prototype using an RC522 module and a MIFARE Classic 1K card.

Test Detail
Information Reported
Reader
RC522 module; PCB and MFRC522 chip versions not stated
Tag
MIFARE Classic 1K card
Supply voltage
Listed as 3.3 V, but voltage during testing was not measured or documented
Antenna orientation
Not reported
Trials per distance
Not reported
Success rate
Not reported as a percentage
Response time
Described qualitatively; no measured times were provided

Distance
Study-Reported Result
1 cm
Successful; described as very fast
2 cm
Successful; described as highly accurate
3 cm
Successful; response described as slightly slower
4 cm
Successful; described as within the optimal range
5 cm
Successful; reported as the stable-distance limit
6 cm
Failed

The prototype detected the card at distances from 1 to 5 cm and failed at 6 cm. However, the study did not report repeated trials, numerical success rates, measured response times, or antenna orientation. Therefore, these findings describe this prototype only and should not be presented as a universal RC522 reliability rating.

Reference: Wijanarko, Y., Alfarizal, N., and Pratama, M. R. (2025). “Implementation of an RFID RC522 and IoT-Based Automatic Door Security System in an Electrical Engineering Laboratory.” Indonesian Journal of Artificial Intelligence and Data Mining, 8(2), 478–488.

RC522 Application Examples and Limitations

Attendance-System Application

Tan et al. (2018) developed a university attendance system using an RFID-RC522 RC522 RC522 NXP RC522 NXP In Stock: 11386 pcs reader, NodeMCU controller, Wi-Fi, and compatible 13.56 MHz campus cards. Students scanned their cards at the classroom entrance, and a mobile application confirmed that the cloud database received each attendance record. In one classroom test, the reported attendance rate increased from 85% to 98%.

The paper did not state the attendance sample size, test duration, number of class sessions, reading distance, scan time, or card-failure rate. It also lacked a control group and evaluated a wider platform containing mobile, QR-code, and classroom-interaction features. Therefore, the increase cannot be attributed to the RC522 alone.

Reference: Tan, P., Wu, H., Li, P., and Xu, H. (2018). “Teaching Management System with Applications of RFID and IoT Technology.” Education Sciences, 8(1), Article 26. DOI: 10.3390/educsci8010026.

Offline Payment Application

Dewanto et al. (2021) built an offline payment prototype using an Arduino Uno, MFRC522 reader, LCD, and microSD card. It updated electronic-money balances and stored purchases, top-ups, and refunds locally.

A 30-tap test achieved 100% card-detection success at 1–3 cm and 0% at 4 cm. Reader response time at 1–3 cm was 0.1–0.2 seconds. Complete transactions took 1.4–2.0 seconds with sufficient balance, 0.5 seconds with insufficient balance, and 0.3 seconds for unregistered cards.

The paper did not clearly explain how the taps were distributed, how many cards were used, or the variation between measurements. Its stopwatch-based results apply only to the prototype. Card cloning, key recovery, replay attacks, and tamper resistance were not tested, so the system was not validated for production payment use.

Reference: Dewanto, S. A., Munir, M., Wulandari, B., and Alfian, K. (2021). “MFRC522 RFID Technology Implementation for Conventional Merchant with Cashless Payment System.” Journal of Physics: Conference Series, 1737(1), 012012. DOI: 10.1088/1742-6596/1737/1/012012.

Common RC522 Problems and Diagnostic Tests

Problem
Diagnostic test
Solution
Module is not detected
Check for 3.3 V and run PCD_DumpVersionToSerial().
Correct the power, ground, SPI, SS and RST connections.
Tag is not recognized
Test the included 13.56 MHz card close to the antenna.
Use an ISO/IEC 14443A-compatible card. The RC522 RC522 RC522 NXP RC522 NXP In Stock: 11386 pcs cannot read 125 kHz tags.
Reading is unstable
Hold the card parallel to the antenna and remove nearby metal.
Use short wires, stable 3.3 V power and proper tag alignment.
Authentication fails
Verify the tag type, sector, block and Key A or Key B.
Use the correct MIFARE Classic sector key.
Data cannot be written
Test an unused data block and read it back.
Check access permissions and avoid block 0 or sector trailers.
Reader stops after one card
Remove and present the card again.
End the session with PICC_HaltA() and PCD_StopCrypto1().
Reader fails when a motor activates
Disconnect the motor or relay and retest.
Use separate power filtering and flyback protection.

RC522 vs PN532, PN7160, and CLRC663 Plus

Device
NFC Modes
Smartphone Support
Host Interface
Supported Standards
Product Status
Recommended Use
MFRC522
Reader/writer only
Limited; no peer-to-peer or card-emulation modes, and the common Arduino library does not support smartphone communication
SPI, I²C or serial UART
ISO/IEC 14443A, MIFARE and NTAG
End of Life; NXP recommends CLRC663 Plus
Existing low-cost Arduino and ESP32 projects using compatible cards or tags
PN532 PN532 PN532 NXP In Stock: 10135 pcs
Reader/writer, card emulation and NFCIP-1 peer-to-peer
Yes, when supported by the smartphone operating system and application
SPI, I²C or high-speed UART
ISO/IEC 14443A/B, MIFARE, FeliCa and ISO/IEC 18092
Not Recommended for New Designs; NXP recommends PN7160
Maintaining older NFC projects that require multiple NFC modes
PN7160
All NFC Forum modes: reader/writer, card emulation and active or passive peer-to-peer
Yes; supports reader interaction, card emulation and peer-to-peer, although phone operating systems may restrict P2P
I²C or SPI using NCI 2.0
NFC Forum Tag Types 1–5, ISO/IEC 14443A/B, MIFARE Classic, FeliCa and ISO/IEC 15693
Active
New embedded and IoT products requiring full NFC support; not intended for EMVCo payment compliance
CLRC663 Plus
Multi-protocol reader/writer and ISO/IEC 18092 passive initiator
Limited to reader-side communication with compatible phone card-emulation modes; requires a host protocol stack
SPI, I²C or UART
ISO/IEC 14443A/B, MIFARE, NTAG, FeliCa, ISO/IEC 15693 and ISO/IEC 18000-3 Mode 3
Active; recommended MFRC522 replacement
High-performance access-control, industrial, gaming and multi-protocol reader designs

The PN532 is not recommended for new designs. NXP recommends the PN7160 as its replacement. The PN7160 supports all NFC Forum modes, but peer-to-peer availability still depends on the software stack and smartphone operating system.






Frequently Asked Questions [FAQ]

1. How can duplicate RFID scans be prevented in an attendance system?

Store the last UID and scan time, then ignore repeated scans within a chosen delay. For better control, require the card to leave the RF field before accepting it again.

2. How should RC522 UIDs be stored in a database?

Store the UID length together with every raw byte because UIDs may contain 4, 7 or 10 bytes. Avoid converting them into a normal integer, which can remove leading zeros or exceed the available number size.

3. How much usable memory does a MIFARE Classic 1K card provide?

The card contains 1,024 bytes divided into 16 sectors. After excluding the manufacturer block and sector trailers, approximately 752 bytes remain in normal data blocks.

4. Can the RC522 read and write NDEF records on NTAG tags?

The hardware can communicate with compatible NTAG products, but NDEF handling depends on the software library. The program must understand the NFC Type 2 memory structure, TLV fields and NDEF record format rather than treating the tag as ordinary raw memory.

Related Article

Online RFQ submissions: Fast responses, Better prices!

RFQ