JSON Encoding is one of two standard OPC UA serialization formats, alongside UA Binary Encoding. It maps OPC UA DataSet messages and service payloads into JSON text, making them directly consumable by web applications, cloud platforms, and RESTful APIs without requiring proprietary binary parsers. This format is mandatory for OPC UA PubSub over MQTT and HTTPS transports.
Glossary
JSON Encoding

What is JSON Encoding?
JSON Encoding is a text-based, human-readable serialization format defined by the OPC UA specification that encodes data structures as JavaScript Object Notation, primarily used with web-friendly transports like MQTT and HTTPS.
While less compact than binary encoding, JSON offers superior interoperability with IT systems. It supports both reversible encoding, which preserves full OPC UA type information for round-tripping, and non-reversible encoding, which simplifies data for generic JSON consumers. The format is defined in Part 6 of the OPC UA specification.
Key Features of JSON Encoding
JSON encoding is a lightweight, text-based data interchange format defined by the OPC UA specification for use with web-friendly transports. It structures data as human-readable JavaScript Object Notation, enabling interoperability between industrial automation systems and modern cloud applications.
Human-Readable Structure
JSON encoding represents OPC UA data as key-value pairs and ordered arrays in plain text. Unlike the compact UA Binary Encoding, JSON is self-describing and can be inspected directly in a text editor or browser developer console.
- Uses UTF-8 character encoding for universal compatibility
- Structures complex Node attributes and DataSets as nested objects
- Enables debugging without specialized protocol analyzers
- Ideal for RESTful APIs and webhook integrations
Reversible Encoding
JSON encoding provides a lossless, bidirectional mapping between OPC UA data structures and their JSON representation. Every encoded message can be decoded back to its original Variant type without ambiguity.
- Preserves StatusCode and timestamp metadata alongside values
- Handles arrays, matrices, and multi-dimensional structures
- Supports the full OPC UA Built-in Type system, including Guid, DateTime, and ByteString
- Maintains Namespace and NodeId integrity across serialization boundaries
Transport Protocol Flexibility
JSON encoding is the preferred format for OPC UA communication over WebSockets and HTTPS, making it essential for cloud connectivity and browser-based dashboards.
- Used extensively with OPC UA PubSub over MQTT for IoT integrations
- Compatible with standard HTTP Content-Type: application/json headers
- Enables firewall-friendly communication on port 443
- Supports stateless request-response patterns via RESTful OPC UA gateways
Compact and Non-Compact Modes
The OPC UA specification defines two JSON encoding variants to balance readability against payload size.
- Non-Reversible (Verbose): Uses human-friendly property names like
"Value"and"StatusCode", maximizing readability for debugging - Reversible (Compact): Employs abbreviated numeric field identifiers to minimize bandwidth, suitable for high-throughput production environments
- Both modes conform to RFC 8259 and ECMA-404 standards
- The DataSetMessage header indicates which encoding mode is in use
Native Web Ecosystem Integration
Because JSON is the lingua franca of web development, OPC UA JSON encoding eliminates the need for custom parsing libraries in cloud applications.
- Directly consumable by JavaScript, Python, and Node.js applications
- Compatible with AWS IoT Core, Azure IoT Hub, and Google Cloud IoT
- Enables serverless function processing of industrial telemetry
- Simplifies integration with time-series databases like InfluxDB and TimescaleDB
DataSetMessage Mapping
In the PubSub model, JSON encoding defines how a DataSet is serialized into a DataSetMessage for distribution to subscribers.
- Each DataSetWriter specifies JSON as its MessageMapping
- Field values are encoded as a JSON object with name-value pairs
- Supports DeltaFrame messages that transmit only changed values
- The NetworkMessage envelope wraps one or more DataSetMessages with routing metadata
JSON Encoding vs. UA Binary Encoding
A technical comparison of the two OPC UA data serialization formats, evaluating their suitability for different industrial communication scenarios.
| Feature | JSON Encoding | UA Binary Encoding |
|---|---|---|
Format Type | Text-based (UTF-8) | Binary stream |
Human Readability | ||
Payload Size | Larger (verbose syntax) | Compact (minimal overhead) |
Encoding/Decoding Speed | Slower (text parsing) | Faster (direct memory mapping) |
Native Web Compatibility | ||
Transport Protocol Pairing | HTTPS, WebSocket, MQTT | UA TCP, TSN |
Schema Validation Overhead | Higher (string-based) | Lower (binary structure) |
Use Case | Cloud integration, web dashboards, RESTful APIs | High-speed automation, controller-to-controller, deterministic fieldbus |
Frequently Asked Questions
Clear, technical answers to the most common questions about OPC UA's JSON data serialization format, its structure, and its role in modern industrial interoperability.
JSON Encoding in OPC UA is a text-based, human-readable data serialization format that represents structured information from the OPC UA Address Space as JavaScript Object Notation (JSON) as defined in RFC 8259. Unlike the compact UA Binary Encoding, JSON Encoding prioritizes interoperability with web-friendly transports and RESTful APIs by converting typed Nodes, their attributes, and values into key-value pairs and arrays. This encoding is formally specified in Part 6 of the OPC UA standard and supports two primary profiles: Non-Reversible JSON, which omits specific type metadata for simplicity, and Reversible JSON, which includes namespace URIs, server indexes, and data type identifiers to allow a receiver to perfectly reconstruct the original binary structure. It is the default encoding for the HTTPS transport and is commonly paired with OPC UA PubSub over MQTT to publish DataSet messages directly to cloud brokers like AWS IoT or Azure Event Grid without requiring proprietary binary parsers.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Understanding JSON Encoding requires familiarity with the core serialization formats, transport mappings, and data structuring mechanisms within the OPC UA framework.
UA Binary Encoding
The compact, high-performance alternative to JSON Encoding. UA Binary serializes data structures into a binary stream for efficient transport over TCP. It minimizes payload size and CPU overhead, making it the preferred format for resource-constrained controllers and high-throughput, real-time communication where parsing speed is critical.
OPC UA PubSub over MQTT
A transport protocol mapping that uses the lightweight MQTT broker to distribute OPC UA DataSet messages. JSON Encoding is the default and most common payload format for this mapping, as its text-based nature aligns perfectly with MQTT's publish-subscribe model and cloud-native architectures. This combination is the standard for edge-to-cloud data ingestion.
DataSet
A defined collection of field-level data values configured in a Publisher. When using JSON Encoding, a DataSet is serialized as a single JSON object containing key-value pairs for each field. This structure allows subscribers to parse a coherent snapshot of related process variables—such as temperature, pressure, and flow rate—from a single network message.
Information Model
The formal, object-oriented schema that defines the structure and semantics of Nodes. JSON Encoding serializes instances of these models into human-readable text. The encoding preserves the hierarchical relationships and data types defined in the model, ensuring that a JSON payload representing a 'Motor' node includes all required properties like speed and status with their correct types.
Security Policy
A named set of cryptographic algorithms used to secure communications. When JSON Encoding is used over HTTPS (WebSocket Secure), the transport-level encryption provided by TLS secures the text payload. For non-WebSocket transports, JSON messages can be signed and encrypted using the same OPC UA Security Policies applied to binary messages, ensuring confidentiality and integrity.
Reverse Connect
A connectivity mechanism where a Server behind a firewall initiates the connection to a Client. JSON Encoding is frequently used in these scenarios because it traverses web-friendly ports (443) and proxies without deep packet inspection issues. This simplifies secure network traversal for edge devices sending JSON-encoded telemetry to centralized cloud management platforms.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us