OPC UA NodeId Parser
Parse OPC UA NodeId strings into namespace index, identifier type and identifier value. Supports numeric, string, GUID and opaque ByteString identifier forms.
ns=<index>; prefix followed by one identifier:
i= numeric, s= string,
g= GUID or b= opaque ByteString.
—
What Is an OPC UA NodeId?
An OPC UA NodeId uniquely identifies a node within an OPC UA server address space. Nodes can represent objects, variables, methods, data types, reference types and other address-space elements.
A NodeId combines a namespace with an identifier. The identifier can be numeric, textual, a GUID or an opaque ByteString.
OPC UA NodeId Text Syntax
ns=2;i=1001
ns=2;s=Motor1
ns=4;g=72962B91-FA75-4AE6-8D28-B404DC7DAF63
ns=2;b=AQIDBA==When the namespace portion is omitted, namespace index 0 is used in the canonical NodeId interpretation.
Namespace Index
The namespace index identifies an entry in the server’s NamespaceArray. It separates identifiers defined by different standards, vendors or applications.
ns=2;s=Motor1
Namespace Index:
2
Identifier:
Motor1Namespace index 0 is normally associated with the standard OPC UA namespace. Other namespace indexes depend on the server’s NamespaceArray.
Numeric NodeId
The i= form represents an unsigned numeric identifier.
i=2258
Namespace:
0
Type:
Numeric
Value:
2258Numeric identifiers are common for standard OPC UA nodes as well as application-defined nodes.
String NodeId
The s= form represents a string identifier. The string is the
identifier value itself and can contain application-defined text.
ns=2;s=Motor1.Speed
Namespace:
2
Type:
String
Value:
Motor1.SpeedGUID NodeId
The g= identifier type contains a globally unique identifier.
A GUID uses the familiar hexadecimal 8-4-4-4-12 representation.
ns=4;g=72962B91-FA75-4AE6-8D28-B404DC7DAF63The parser validates the GUID structure before accepting the NodeId.
Opaque ByteString NodeId
The b= form represents an opaque ByteString identifier encoded
using Base64 in the textual NodeId representation.
ns=2;b=AQIDBA==
Base64:
AQIDBA==
Decoded bytes:
01 02 03 04
Length:
4 bytesOPC UA NodeId Identifier Types
| Prefix | Identifier Type | Example |
|---|---|---|
| i= | Numeric | ns=2;i=1001 |
| s= | String | ns=2;s=Motor1 |
| g= | GUID | ns=3;g=72962B91-FA75-4AE6-8D28-B404DC7DAF63 |
| b= | ByteString | ns=2;b=AQIDBA== |
NodeId vs BrowseName
A NodeId and BrowseName are different OPC UA concepts. A NodeId uniquely identifies the node within the server, while the BrowseName is used when browsing and navigating the address space.
Changing a BrowseName therefore does not inherently mean that the NodeId has changed.
NodeId vs ExpandedNodeId
An ExpandedNodeId can carry additional namespace or server information beyond a basic NodeId. It can identify a namespace by URI and can include a server index.
This page parses the standard textual NodeId forms using namespace indexes. It does not attempt to interpret full ExpandedNodeId URI/server-index syntax.
Namespace 0
If the textual NodeId contains no explicit ns= prefix, namespace
index 0 is assumed.
Input:
i=2258
Equivalent canonical interpretation:
ns=0;i=2258Why Namespace Indexes Can Change
Namespace indexes are positions within a server’s NamespaceArray. For configuration stored outside the live server, a namespace URI can be more stable than relying only on a numeric namespace index.
The parser reports exactly the namespace index contained in the supplied NodeId; it does not attempt to infer a namespace URI without the server’s NamespaceArray.
OPC UA NodeId Parser FAQs
What does ns= mean in an OPC UA NodeId?
What does i= mean?
What does s= mean?
What does g= mean?
What does b= mean?
What namespace is used when ns= is omitted?
Is NodeId the same as BrowseName?
Can two namespaces contain the same numeric identifier?
Does this parser connect to an OPC UA server?
Can it determine the namespace URI?
Parse OPC UA NodeId Strings
Inspect OPC UA namespace indexes and numeric, string, GUID or ByteString identifier values from standard textual NodeId representations.