Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Multiaddr

Multiaddr is a self-describing network address format from the Multiformats project, encoding multiple layers of protocol information (e.g., IP, port, transport) in a single, future-proof string.
Chainscore © 2026
definition
NETWORKING STANDARD

What is Multiaddr?

A universal network address format for the decentralized web, designed to be self-describing and future-proof.

Multiaddr (short for "multi-address") is a self-describing, composable network address format that encodes multiple layers of network protocols into a single, future-proof string. Unlike traditional addresses like 192.168.1.1:8080, which imply TCP/IP, a Multiaddr explicitly declares its entire protocol stack—for example, /ip4/192.168.1.1/tcp/8080 for IPv4 over TCP, or /ip6/2001:db8::1/udp/4001/quic for IPv6 over QUIC. This explicit encoding ensures addresses remain unambiguous and interoperable across diverse and evolving network environments, a critical requirement for peer-to-peer systems like IPFS and libp2p.

The structure of a Multiaddr is built from a sequence of protocol codes and their corresponding values. Each component, like /ip4/ or /tcp/, is defined in a public table, allowing any system to parse the address step-by-step and understand exactly how to establish a connection. This composability allows for the seamless combination of transport protocols (e.g., TCP, QUIC, WebSockets), network layers (IPv4, IPv6), and application-level protocols (e.g., /p2p/ for peer IDs in libp2p). A key feature is the inclusion of cryptographic peer identities, as in /ip4/1.2.3.4/tcp/443/p2p/QmPeerID, which binds the network location to a specific node in a secure, verifiable way.

Multiaddr's primary use case is within the libp2p networking stack, where it serves as the fundamental addressing scheme for discovering and connecting to peers in a heterogeneous network. It solves the NAT traversal and multi-protocol support challenges inherent in decentralized systems by allowing a single peer to advertise multiple addresses (e.g., one for IPv4, one for IPv6, one for a WebSocket relay). Developers working with IPFS, Filecoin, or other libp2p-based projects will encounter Multiaddrs when configuring node listeners, parsing peer information from the DHT, or managing connection swarms. Its human-readable and machine-optimized binary representation make it a versatile tool for building resilient, protocol-agnostic network applications.

how-it-works
NETWORKING PROTOCOL

How Multiaddr Works

Multiaddr is a self-describing network address format that encodes multiple layers of network protocols into a single, future-proof string, enabling universal connectivity in decentralized systems.

A Multiaddr (short for multi-address) is a convention for representing network addresses that combines multiple protocol layers—such as transport, network, and application protocols—into a single, human-readable string. Unlike traditional addresses like 192.168.1.1:80 or /dns4/example.com, a Multiaddr explicitly declares each protocol using predefined codes (e.g., /ip4, /tcp, /ws). This creates a composable and unambiguous address like /ip4/192.168.1.1/tcp/80 or /dns6/example.com/tcp/443/wss. The format's core innovation is its self-describing nature; any system can parse the address to understand exactly how to establish a connection without prior configuration or assumptions.

The structure follows a simple path-like syntax where each component is a protocol code and its value, separated by forward slashes. Common codes include /ip4 or /ip6 for the network layer, /tcp or /udp for transport, and /dns4 or /dns6 for domain resolution. For encrypted or overlay networks, protocols like /tls, /ws (WebSocket), or /p2p (for libp2p Peer IDs) can be appended. This allows a single Multiaddr to represent complex, multi-hop routes. For instance, /dns4/server.com/tcp/443/tls/ws/p2p/QmPeerID describes a connection to a specific peer over a secure WebSocket tunnel via a domain name.

Encoding and binary representation are critical to Multiaddr's efficiency in network communication. While the string format is human-readable, it is typically converted to a compact binary form for transmission. Each protocol code has a unique, registered number, and values are encoded according to their type (e.g., IPv4 addresses as 4 bytes, TCP ports as 2-byte integers). This binary representation, often prefixed with its length, allows for efficient parsing and is a foundational element for protocols within the libp2p stack, where it enables peer discovery and connection bootstrapping across heterogeneous networks.

The primary benefit of Multiaddr is network protocol agility and future-proofing. New transport protocols (e.g., QUIC, WebRTC) can be added by registering a new code without breaking existing address parsers. This is essential for decentralized systems like IPFS and libp2p that must operate across diverse environments—from browsers to data centers. It solves the network address translation (NAT) and firewall traversal problem by allowing peers to advertise multiple addresses (e.g., both a public IP and a relay address) in a standardized format, increasing the likelihood of a successful connection.

In practice, a node in a peer-to-peer network will typically have multiple Multiaddrs. A developer uses a library like go-multiaddr or js-multiaddr to construct, parse, and manipulate these addresses. When a peer discovers another, it receives a list of its Multiaddrs and attempts to dial each in turn until a connection is established. This multi-address approach is why libp2p peers can seamlessly connect over WebSockets in a browser, TCP on a local network, and QUIC on the public internet, all using the same core addressing scheme.

key-features
NETWORKING PROTOCOL

Key Features of Multiaddr

Multiaddr is a self-describing network address format designed for future-proof, composable peer-to-peer networking. It encodes multiple layers of addressing (e.g., IP, transport, protocol) into a single, human-readable string.

01

Protocol Agnostic & Future-Proof

Multiaddr is designed to be protocol-agnostic, meaning it can encode addresses for any network protocol, not just IP. Its extensible format uses self-describing codes from the multicodec table, allowing it to seamlessly incorporate new protocols (e.g., QUIC, libp2p) without breaking existing systems. This prevents address format obsolescence.

02

Composable & Stackable Addresses

A core feature is the ability to compose or stack multiple protocol layers into a single address. Each component is a key-value pair separated by /. For example, /ip4/192.168.1.1/tcp/443 specifies the IP layer, then the TCP transport. This allows precise specification of the exact route and capabilities required to reach a peer.

03

Human & Machine Readable

Multiaddr strings are designed for both human readability and machine parsing. The textual representation (e.g., /ip6/2001:db8::1/udp/4001/quic) is intuitive. Programs parse it by splitting on / and interpreting each protocol code and its value. This eliminates ambiguity compared to opaque binary formats or multiple configuration fields.

04

Canonicalization & Normalization

To ensure consistency, Multiaddr implementations provide canonicalization. This process ensures semantically equivalent addresses have identical string representations. For instance, it handles zero-padding in IP addresses and orders protocol components correctly. This is critical for deduplication and peer identity in distributed hash tables (DHTs).

06

Common Multiaddr Examples

  • IPv4 over TCP: /ip4/104.131.131.82/tcp/4001
  • IPv6 over UDP (QUIC): /ip6/2001:db8::1/udp/4001/quic
  • DNS-based address: /dns4/example.com/tcp/443/wss (WebSockets Secure)
  • Onion (Tor) address: /onion3/vww6ybal4bd7szmgncyruucpgfkqahzddi37ktceo3ah7ngmcopnpyyd:80
  • With Peer ID: /ip4/1.2.3.4/tcp/4242/p2p/QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N
code-example
NETWORKING

Multiaddr Code Example

A practical demonstration of how to create, parse, and use Multiaddr objects in code to represent composable network addresses.

A Multiaddr (multi-address) is a future-proof, composable network address format designed for heterogeneous networks. It is a convention for encoding multiple layers of addressing into a single, human-readable and machine-optimized string. The core principle is that addresses are represented as a stack of protocol-code and value pairs, such as /ip4/192.168.1.1/tcp/443 or /dns6/example.com/tcp/80/ws. This structure allows applications to handle addresses agnostic of the underlying network layers, from IP addresses to overlay protocols like libp2p or Tor.

In practice, libraries like go-multiaddr (Go) or multiaddr (JavaScript) provide the tools to work with these addresses programmatically. A typical workflow involves parsing a string into a structured Multiaddr object, encapsulating or decapsulating protocol layers (e.g., adding a transport protocol), and extracting specific components like the IP or port. For instance, you can programmatically upgrade a base IP address to use WebSockets or QUIC by appending the appropriate protocol codes, enabling dynamic network stack configuration.

The following pseudocode illustrates common operations:

code
// Create a Multiaddr from a string
addr = Multiaddr('/ip4/127.0.0.1/tcp/8080')
// Decapsulate the TCP layer to get the IP layer
ipAddr = addr.decapsulate('tcp') // -> '/ip4/127.0.0.1'
// Encapsulate to add a WebSocket layer
wsAddr = addr.encapsulate('/ws') // -> '/ip4/127.0.0.1/tcp/8080/ws'
// Get the human-readable string representation
console.log(wsAddr.toString())

This composability is fundamental for peer-to-peer systems where connection paths may involve NAT traversal, relays, or encrypted channels, each represented as an additional protocol layer in the address.

Key use cases for Multiaddr in development include peer discovery in libp2p, where a peer's address may include multiple transport options, and network abstraction in decentralized applications. By using Multiaddr, developers write transport-agnostic code; the same connection logic can handle a direct TCP connection, a WebSocket connection through a browser, or a circuit relay connection via a p2p-circuit address. This eliminates the need for separate code paths for IPv4, IPv6, or DNS-based addresses.

When implementing, it's crucial to handle the binary serialization format for efficient network transmission, alongside the standard string format. The code must also validate addresses to ensure protocol codes are used in a valid order (e.g., an IP layer must come before a TCP layer). Libraries manage this validation, raising errors for malformed addresses. This rigorous structure prevents ambiguity and ensures interoperability across different implementations in the decentralized ecosystem.

ecosystem-usage
MULTIADDR

Ecosystem Usage

Multiaddr is a self-describing network address format used across the decentralized web to encode multiple layers of addressing information into a single, future-proof string.

02

Multi-Transport Support

A key use case is enabling connectivity over diverse network conditions. A single resource can be represented by multiple Multiaddrs, allowing clients to connect via the best available path. For example, a node might be reachable via:

  • /ip4/192.168.1.1/tcp/4001 for local LAN
  • /dns4/node.example.com/tcp/443/wss for WebSocket Secure over the public internet
  • /ip6/::1/udp/4001/quic for low-latency QUIC transport
03

Decentralized Identity & Security

Multiaddr integrates with cryptographic identities through the /p2p (or legacy /ipfs) component. An address like /ip4/10.0.0.1/tcp/4001/p2p/QmPeerID not only specifies how to connect but also who you are connecting to, using a hash of the peer's public key. This prevents man-in-the-middle attacks and is essential for building secure, permissionless p2p networks without centralized certificate authorities.

05

Future-Proof Network Addressing

The format is designed to be extensible. New transport protocols or addressing schemes can be added via the Multicodec table without breaking existing implementations. This means an address created today will remain parseable in the future, and new network layers (e.g., onion services, Bluetooth, specialized hardware) can be integrated seamlessly, ensuring the ecosystem avoids address obsolescence.

06

Use in dApps & Services

Beyond core infrastructure, Multiaddr is used by decentralized applications and services that require direct peer connectivity. This includes:

  • Textile and Fleek for decentralized storage and hosting.
  • OrbitDB for peer-to-peer databases.
  • Status.im for messaging.
  • Blockchain light clients and bridges that establish direct p2p connections to full nodes for data retrieval.
etymology-history
TERM ORIGINS

Etymology and History

The term **Multiaddr** is a portmanteau and a technical specification that emerged from the practical needs of decentralized networking.

The name Multiaddr is a contraction of "multi-address," which precisely describes its function: a single, future-proof address format capable of encoding multiple network protocols and addresses. It was created to solve a fundamental problem in peer-to-peer (P2P) systems like libp2p, where nodes need to communicate over diverse transports—such as TCP/IP, WebSockets, or QUIC—and may have multiple public endpoints (IPv4, IPv6, Tor). Before Multiaddr, managing these combinations required complex, ad-hoc serialization, making network code brittle and hard to compose.

The specification was formally developed within the libp2p project, a core component of the IPFS (InterPlanetary File System) ecosystem. Its creation was driven by the need for a self-describing network address that could be easily parsed by machines and understood by humans. The syntax, resembling a path-like structure (e.g., /ip4/192.168.1.1/tcp/443), was inspired by the composability of URLs and Unix filesystem paths, allowing protocols and their arguments to be chained together deterministically. This design enables systems to negotiate connections without prior configuration about supported transports.

The historical significance of Multiaddr lies in its role as a foundational abstraction layer for the decentralized web. By decoupling application logic from specific network layers, it facilitated the creation of transport-agnostic P2P applications. Its adoption beyond libp2p, in projects like Ethereum and various blockchain clients, underscores its utility as a universal networking primitive. The evolution of the standard continues, with ongoing proposals to support new protocols like QUIC and WebTransport, ensuring it remains the canonical way to represent network addresses in an increasingly multi-transport internet.

PROTOCOL COMPARISON

Multiaddr vs. Traditional Address Formats

A technical comparison of the self-describing Multiaddr format against traditional, single-protocol address formats.

FeatureTraditional Address (e.g., IPv4, Ethereum)Multiaddr

Address Structure

Single, opaque string for one protocol

Composable, type-length-value (TLV) encoded

Protocol Agnosticism

Human Readability

Varies by protocol

Self-describing (e.g., /ip4/192.168.1.1/tcp/80)

Multi-Protocol Nesting

Future-Proofing

Requires new standard per protocol

Extensible via new protocol codes

Typical Use Case

Direct endpoint for a single network

Complex routing, p2p overlays, libp2p

Example

192.168.1.1 or 0x742d35Cc6634C0532925a3b844Bc9e...

/ip4/192.168.1.1/tcp/443/tls/p2p/QmCryptoHash

benefits-for-developers
MULTIADDR

Benefits for Developers

Multiaddr is a self-describing network address format that enables future-proof, protocol-agnostic peer identification across decentralized networks.

01

Protocol-Agnostic Addressing

A Multiaddr encodes both the network protocol (e.g., IP4, IP6, DNS) and the transport protocol (e.g., TCP, UDP, WebSockets) in a single, composable string. This eliminates ambiguity, allowing a single address format to work across the entire stack.

  • Example: /ip4/192.168.1.1/tcp/80 or /dns/example.com/tls/ws
  • Developers don't need separate logic for IPv4 vs. IPv6 or TCP vs. WebSockets.
02

Future-Proof & Extensible Design

The format is designed for evolution. New protocols can be added via a public registry without breaking existing implementations. This means applications built with Multiaddr today can seamlessly support new transport layers (like QUIC or libp2p) tomorrow.

  • Core benefit: Backward and forward compatibility.
  • Prevents address format obsolescence as the networking landscape changes.
03

Simplified Peer Discovery & Connection

In P2P systems like libp2p, Multiaddr is the fundamental unit for peer identity and location. A peer's PeerId is often wrapped in a Multiaddr (/p2p/Qm...), creating a fully self-contained address.

  • Enables multi-hole punching and NAT traversal by specifying multiple potential routes.
  • Libraries handle the complexity of parsing and dialing the correct protocol stack.
04

Human-Readable & Machine-Optimized

Multiaddr strikes a balance between readability and efficiency.

  • Human-readable: The string format is clear for debugging and configuration (e.g., /dnsaddr/bootstrap.libp2p.io/tcp/443/wss).
  • Binary-packed: For wire transmission, it is efficiently encoded as a multicodec byte sequence, minimizing overhead.
  • This dual nature simplifies both development and network performance.
05

Enhanced Security & Explicit Trust

By explicitly stating the transport and encryption layers, Multiaddr makes security assumptions clear. An address like /ip4/10.0.0.1/tcp/9090 is plaintext, while /dns/secure.node.com/tls/ws explicitly indicates TLS encryption.

  • Developers and users can audit the security context from the address itself.
  • Prevents accidental use of insecure connections by making the protocol stack transparent.
06

Core Infrastructure for Interoperability

Multiaddr is not just a libp2p concept; it's a standard for any networked system needing unambiguous addresses. Its adoption in projects like IPFS, Filecoin, and Ethereum client networks creates a common language for connectivity.

  • Reduces integration friction between different decentralized protocols.
  • Serves as a foundational interoperability layer for the decentralized web.
MULTIADDR

Frequently Asked Questions (FAQ)

Multiaddr is a fundamental protocol for network addressing in decentralized systems. These questions cover its core concepts, practical applications, and relationship to other networking standards.

Multiaddr is a self-describing, composable network address format designed for future-proof, multi-protocol networking in decentralized systems. It works by encoding both the network protocol (e.g., IP4, IP6, DNS4, DNS6, Onion3) and the protocol-specific address into a single, human-readable and machine-optimized string, using a simple /protocol-code/value syntax. Each component is represented by a registered protocol code, allowing addresses to be easily parsed, composed, and upgraded. For example, /ip4/192.168.1.1/tcp/80 specifies an IPv4 address and a TCP port. Its binary-packed format, used in libraries like libp2p, ensures efficient on-wire transmission while the string format remains human-readable.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team