CGI Decoder / Encoder
Decode or encode 2G / 3G / 4G / 5G Cell Global Identities — extract PLMN, LAC, CI, ECI, NCI, eNB-ID, gNB-ID and more.
| MCC + MNC | Decimal digitsdec— BCD-encoded into first 6 hex chars (e.g. MCC 404 MNC 10 → 04F401) |
| LAC, CI | Hexadecimalhex— bytes 4–5 and 6–7 in the CGI (2G / 3G) |
| ECI | Hexadecimalhex— bytes 4–7 in the ECGI (4G LTE), 28-bit value |
| NCI | Hexadecimalhex— bytes 4–8 in the NCGI (5G NR), 36-bit value |
⚠️ MCC/MNC are BCD-encoded — do not type digits directly. MCC 404 MNC 10 → PLMN hex 04F401 (not 40410). to generate the hex from MCC + MNC.
Technology filter
CGI Format Reference
A Cell Global Identity (CGI) is a globally unique identifier for a mobile network cell. It is built from a PLMN identifier (MCC + MNC) followed by technology-specific cell identifiers encoded in hexadecimal.
PLMN (3 bytes · 6 hex) — shared by all technologies
Byte 0 : MCC digit 2 (high) | MCC digit 1 (low)
Byte 1 : MNC digit 3 / 0xF (high) | MCC digit 3 (low)
Byte 2 : MNC digit 2 (high) | MNC digit 1 (low)
MNC digit 3 = 0xF when MNC is 2-digit (3GPP TS 24.008 §10.5.1.13)
| Technology | Total length | After PLMN | Fields | Format |
|---|---|---|---|---|
| PLMN (all) | 6 hex | — | MCC (3 digits) + MNC (2–3 digits) | decimal BCD-encoded |
| 2G (GSM) | 14 hex | 8 hex | LAC (2B) + CI (2B) | hex |
| 3G (UMTS) | 14 hex | 8 hex | LAC (2B) + CI (2B) | hex |
| 4G (LTE) | 14 hex | 8 hex | ECI 28-bit → eNB-ID 20b + Cell-ID 8b | hex |
| 5G (NR) | 16 hex | 10 hex | NCI 36-bit → gNB-ID + NR Cell-ID | hex |
4G — ECI split (28-bit)
eNB-ID = ECI >> 8 (upper 20 bits, range 0–1 048 575)
Cell-ID = ECI & 0xFF (lower 8 bits, range 0–255)
5G — NCI split (36-bit, gNB-ID bits configurable)
gNB-ID = NCI / 2^(36 − gNB-ID-bits) (upper bits)
NR Cell-ID = NCI mod 2^(36 − gNB-ID-bits) (lower bits)
Default gNB-ID bit length = 22 bits (3GPP TS 38.413). Operators may configure 22–32.
The PLMN MCC and MNC identify the serving network — look up operator details or use the frequency to band converter to identify which radio band a cell is using.
Frequently Asked Questions
What is a CGI in mobile networks?▾
A Cell Global Identity (CGI) is a unique identifier for a single cell in a mobile network. It consists of the PLMN (MCC + MNC) to identify the operator plus country, followed by a cell-specific part: LAC and CI for 2G/3G, ECI for 4G LTE, or NCI for 5G NR. CGIs are used in call detail records, drive test logs, SON (Self-Organising Networks), and network management systems.
Why do 2G, 3G, and 4G all produce 14-character hex strings?▾
2G, 3G, and 4G all use 7 bytes (3 bytes PLMN + 4 bytes for the cell-specific field), which equals 14 hex characters. The difference is in how those 4 bytes are interpreted: 2G/3G split them into a 2-byte LAC and 2-byte CI, while 4G treats all 4 bytes as a single 28-bit ECI (eNB-ID + Cell-ID). The decoder shows all three interpretations for a 14-character input.
What is ECI and how is eNB-ID extracted?▾
The E-UTRAN Cell Identifier (ECI) is a 28-bit number that identifies an LTE cell globally within a PLMN. The upper 20 bits are the eNB-ID (identifies the base station) and the lower 8 bits are the local Cell-ID (0–255, identifying a sector on that base station). For example, ECI = 0x1000A: eNB-ID = 0x1000A >> 8 = 0x100 = 256, Cell-ID = 0x0A = 10.
What is NCI and how does gNB-ID work in 5G?▾
The NR Cell Identity (NCI) is a 36-bit number used in 5G. It is split into a gNB-ID (identifying the gNodeB) and a NR Cell-ID (identifying the cell on that gNB). The number of bits for the gNB-ID is operator-configurable between 22 and 32 bits (3GPP TS 38.413), with 22 bits being the most common default. The decoder lets you set this bit length for correct extraction.
What is PLMN and how is it BCD-encoded?▾
PLMN (Public Land Mobile Network) is identified by MCC (3-digit Mobile Country Code) and MNC (2 or 3-digit Mobile Network Code). It is BCD-encoded in 3 bytes: Byte 0 contains MCC digits 2 and 1, Byte 1 contains MNC digit 3 (or 0xF for 2-digit MNC) and MCC digit 3, Byte 2 contains MNC digits 2 and 1. For example, MCC 404 MNC 10 (Airtel India) encodes as 04F401 in hex.
Can I use this tool to decode drive test logs?▾
Yes. Drive test tools and network analysers (TEMS, Nemo, Actix) often log cells in raw hex CGI format in their exports. Paste the hex value into the decode field and the tool will extract the operator (from PLMN), LAC or ECI or NCI, and derived fields like eNB-ID and Cell-ID. For 5G NR logs, make sure to check the gNB-ID bit length used by the operator (commonly found in NG Application Protocol — NGAP — messages).