Skip to main content
Developer Docs

Credential Formats

Understanding the different verifiable credential formats and when to use each one.

Overview

Verifiable credentials can be encoded in several formats, each with different trade-offs for privacy, interoperability, and use cases. Aho supports the three most widely adopted formats in the industry.

W3C

JWT VC (W3C Verifiable Credentials)

JWT VC is the original W3C Verifiable Credentials format, encoding credentials as JSON Web Tokens (JWTs). It's the most widely supported format and provides strong interoperability across different systems.

Advantages

  • Widest ecosystem support and tooling
  • Simple to implement and verify
  • Human-readable JSON-LD structure
  • Compatible with existing OAuth/OIDC infrastructure

Considerations

  • No native selective disclosure (all claims visible)
  • Verifier can correlate holders across presentations
  • Larger payload size due to JSON-LD context

Best For

Use JWT VC when you need maximum interoperability, when all claims will always be shared together, or when integrating with systems that already use JWT-based authentication.

Professional certifications Academic diplomas Employment verification Membership cards
IETF

SD-JWT VC (Selective Disclosure JWT)

SD-JWT VC extends standard JWTs with selective disclosure capabilities, allowing holders to reveal only specific claims to verifiers. This provides a balance between privacy and practicality.

Advantages

  • Selective disclosure of individual claims
  • Privacy-preserving by design
  • Builds on familiar JWT infrastructure
  • Adopted by EU Digital Identity Wallet (EUDI)

Considerations

  • More complex than plain JWT VC
  • Newer standard with evolving tooling
  • Holder must manage disclosure choices

How Selective Disclosure Works

  1. 1 Issuance: The issuer creates a credential with all claims hashed individually, plus "disclosures" for each claim.
  2. 2 Storage: The holder stores the credential JWT plus all disclosure values.
  3. 3 Presentation: When sharing, the holder includes only the disclosures for claims they want to reveal.
  4. 4 Verification: The verifier can only see disclosed claims, but can verify the credential's integrity.

Best For

Use SD-JWT VC when privacy is important and holders need control over what information they share. Ideal for credentials containing sensitive personal data.

Government IDs Health records Age verification KYC credentials
ISO

mDoc (Mobile Document - ISO 18013-5)

mDoc is the ISO standard format originally designed for mobile driver's licenses (mDL). It uses CBOR encoding for compact size and is optimized for offline verification scenarios.

Advantages

  • Compact binary format (CBOR)
  • Designed for offline/proximity verification
  • Native selective disclosure support
  • Apple and Google wallet support (mDL)

Considerations

  • More complex implementation
  • Requires specialized tooling for CBOR
  • Originally government-focused ecosystem

Best For

Use mDoc for government-issued documents and scenarios requiring offline verification, especially when integrating with Apple Wallet or Google Wallet.

Driver's licenses National ID cards Travel documents In-person verification

Format Comparison

Feature JWT VC SD-JWT VC mDoc
Standard Body W3C IETF ISO
Encoding JSON (Base64) JSON (Base64) CBOR (Binary)
Selective Disclosure No Yes Yes
Offline Verification Limited Limited Optimized
Payload Size Larger Medium Smallest
Ecosystem Maturity Mature Growing Specialized