5.2.2.9 NodeId
The components of a NodeId are described the Table 16.
| Name | Data Type | Description |
|---|---|---|
| Namespace | UInt16 | The index for a namespace URI. An index of 0 is used for OPC UA defined NodeIds. |
| IdentifierType | Enumeration | The format and data type of the identifier. The value may be one of the following: NUMERIC - the value is an UInt32; STRING - the value is String; GUID - the value is a Guid; OPAQUE - the value is a ByteString; |
| Value | UInt32 or String or Guid or ByteString | The identifier for a node in the address space of an OPC UA Server. |
The DataEncoding of a NodeId varies according to the contents of the instance. For that reason, the first byte of the encoded form indicates the format of the rest of the encoded NodeId. The possible DataEncoding formats are shown in Table 17. Table 17 through Table 20 describe the structure of each possible format (they exclude the byte which indicates the format).
| Name | Value | Description |
|---|---|---|
| Two Byte | 0x00 | A numeric value that fits into the two-byte representation. |
| Four Byte | 0x01 | A numeric value that fits into the four-byte representation. |
| Numeric | 0x02 | A numeric value that does not fit into the two or four byte representations. |
| String | 0x03 | A String value. |
| Guid | 0x04 | A Guid value. |
| ByteString | 0x05 | An opaque (ByteString) value. |
| NamespaceUri Flag | 0x80 | See discussion of ExpandedNodeId in 5.2.2.10. |
| ServerIndex Flag | 0x40 | See discussion of ExpandedNodeId in 5.2.2.10. |
The standard NodeId DataEncoding has the structure shown in Table 18. The standard DataEncoding is used for all formats that do not have an explicit format defined.
| Name | Data Type | Description |
|---|---|---|
| Namespace | UInt16 | The NamespaceIndex. |
| Identifier | * | The identifier which is encoded according to the following rules:
|
An example of a String NodeId with Namespace = 1 and Identifier = "Hot水" is shown in Figure 7.

The Two Byte NodeId DataEncoding has the structure shown in Table 19.
| Name | Data Type | Description |
|---|---|---|
| Identifier | Byte | The Namespace is the default OPC UA namespace (i.e. 0). The Identifier Type is ‘Numeric’. The Identifier shall be in the range 0 to 255. |
An example of a Two Byte NodeId with Identifier = 72 is shown in Figure 8.

The Four Byte NodeId DataEncoding has the structure shown in Table 20.
| Name | Data Type | Description |
|---|---|---|
| Namespace | Byte | The Namespace shall be in the range 0 to 255. |
| Identifier | UInt16 | The Identifier Type is ‘Numeric’. The Identifier shall be an integer in the range 0 to 65 535. |
An example of a Four Byte NodeId with Namespace = 5 and Identifier = 1025 is shown in Figure 9.
