JSON-LD Badge Metadata: How Digital Badge Verification Works
When someone says a digital badge is "verifiable," there's actual machinery behind that claim. It's not a website showing a badge image with a name on it. It's structured data embedded in or linked to the badge, following a defined standard, with a verification chain that any independent tool can follow. That machinery is JSON-LD metadata.
This article explains how JSON-LD metadata works in digital badges, what it is, what fields it contains, how it ends up in (or linked to) a badge image, and how verification tools use it to confirm a badge is real. No programming experience required, though we do show real JSON examples, they're readable, we promise.
For the context on why this matters, start with What Are Open Badges? or the Digital Credentials Complete Guide.
What Is JSON-LD?
JSON stands for JavaScript Object Notation, a lightweight text format for representing structured data. It's used everywhere in web development because it's human-readable and machine-parseable. Here's what a simple JSON object looks like:
{
"name": "Alex Smith",
"award": "Data Science Foundations",
"date": "2026-03-16"
}
The "LD" in JSON-LD stands for Linked Data. Linked Data is a method of connecting information on the web by referencing shared vocabularies, so that machines can understand the meaning of data, not just its structure. A plain JSON field called "date" is ambiguous, a date of what? JSON-LD resolves this by including a @context declaration that links the fields to defined meanings.
In Open Badges, the @context declaration points to the Open Badges vocabulary (a published JSON-LD context document). This means any machine reading a badge assertion knows that issuedOn means "the date this badge was issued," recipient means "the person who received this badge," and so on, not because of local conventions, but because of the shared vocabulary.
Badge Baking: embedding metadata in images
"Badge baking" is one of those terms that sounds mysterious but describes something elegantly simple: the process of embedding the badge's JSON-LD assertion metadata directly into the badge image file.
Digital image files, particularly PNG and SVG formats, support metadata fields that can store arbitrary text. In PNG files, this is done through "iTXt" chunks (international text chunks) in the PNG data structure. The badge assertion JSON is stored in one of these chunks, attached to the image data but not displayed visually.
What this means: when someone downloads their badge image, they're not just downloading a picture. They're downloading a picture that contains its own proof of authenticity. If they upload it to a verifier, the verifier reads the hidden metadata and checks the credential chain.
Not all badges are baked, though. In Open Badges 2.0, there are two delivery formats:
- Baked badges: The assertion JSON is embedded in the image. The badge file is self-contained.
- Hosted badges: The image contains only a reference URL. The actual assertion is hosted at that URL by the issuing platform.
Most modern badge platforms default to hosted badges, with baking available on request or automatically. Open Badges 3.0 shifts toward self-contained credentials (more like baked badges) because the cryptographic proof makes server-independent verification possible.
The three Badge objects and their fields
Open Badge metadata is organized into three interconnected JSON-LD objects. Here's each one with its key fields.
1. The Assertion
This is the individual credential record, the specific instance of a badge being awarded to a specific person. Every issued badge has exactly one assertion.
| Field | Required? | Description |
|---|---|---|
| @context | Required | Points to the Open Badges JSON-LD vocabulary (e.g., "https://w3id.org/openbadges/v2") |
| type | Required | Must be "Assertion" (OB 2.0) or "OpenBadgeCredential" (OB 3.0) |
| id | Required | Unique URL identifying this specific assertion, the canonical location of the hosted assertion |
| recipient | Required | Object containing the hashed recipient identity and the identity type (email, DID) |
| badge | Required | URL pointing to the BadgeClass, the definition of what was earned |
| issuedOn | Required | ISO 8601 date-time of when the badge was issued |
| verification | Required | Object describing how to verify the assertion (hosted URL or signed key) |
| expires | Optional | ISO 8601 date after which the credential is considered expired |
| evidence | Optional | Array of evidence objects, URLs, descriptions, and artifact references showing the work done to earn the badge |
| narrative | Optional | Free-text description of the achievement in the context of this specific earner |
2. The BadgeClass
This is the template or definition of the badge, what it means, who grants it, and what's required to earn it. It's shared across all assertions of that badge type.
| Field | Required? | Description |
|---|---|---|
| type | Required | Must be "BadgeClass" |
| id | Required | Unique URL for this badge definition, must be stable and publicly accessible |
| name | Required | The human-readable name of the badge |
| description | Required | Description of the badge and what it represents |
| image | Required | URL of the badge image |
| criteria | Required | URL or inline object describing what was required to earn the badge |
| issuer | Required | URL pointing to the IssuerProfile |
| tags | Optional | Array of keyword strings for categorization |
| alignment | Optional | Array of alignment objects mapping the badge to external frameworks (e.g., O*NET, ESCO) |
3. The issuer profile
Describes the organization or person issuing the badge. Verifiers fetch this to confirm who issued the badge and to retrieve the public key (in OB 3.0).
| Field | Required? | Description |
|---|---|---|
| type | Required | Must be "Issuer" or "Profile" |
| id | Required | Unique URL or DID for the issuing organization |
| name | Required | The name of the issuing organization |
| url | Optional | The organization's website URL |
| Optional | Contact email for the issuing organization | |
| publicKey | OB 3.0 | The organization's public key used to verify cryptographic proofs on OB 3.0 credentials |
How recipient identity Is protected (Hashing)
A common question: is my email address visible in the badge metadata? The answer is no, and the mechanism used to protect it while still enabling verification is called hashing.
When an assertion is created, the recipient's email is not stored directly. Instead, a one-way mathematical function (a hash function, specifically SHA-256) is applied to the email, producing a fixed-length string that looks like gibberish. This hash is stored in the metadata. Also, a random "salt" value is added to the email before hashing, preventing rainbow-table attacks (pre-computed hash tables).
{
"recipient": {
"type": "email",
"hashed": true,
"salt": "abc123randomsalt",
"identity": "sha256$a9b8c7..." // hash of salt+email
}
}
To verify that a badge belongs to a specific person, the verifier takes the claimed email address, prepends the salt, hashes the result, and compares it to the stored hash. If they match, the badge belongs to that person. If they don't, it doesn't. Crucially, no one can reverse the hash to find the email address.
The verification flow, step by step
Input: Badge file or URL
The verifier receives either the badge image file (with baked metadata) or the assertion URL. Both lead to the same JSON-LD assertion data.
Extract or fetch the assertion
For a baked badge: extract the JSON-LD from the PNG's iTXt chunk. For a hosted badge: perform an HTTP GET request to the assertion URL to retrieve the JSON.
Fetch the BadgeClass
The assertion contains a badge field with a URL pointing to the BadgeClass. The verifier fetches this URL and confirms the badge definition exists and is valid.
Fetch the Issuer Profile
The BadgeClass contains an issuer field with the Issuer Profile URL. The verifier fetches this to confirm the issuing organization and, in OB 3.0, to retrieve the public key.
Verify recipient identity
If checking against a specific person, the verifier hashes the provided email (with the stored salt) and compares to the identity hash in the assertion.
Check expiration and revocation
If the assertion has an expires field, the verifier checks whether the badge is still within its validity period. If the issuer has published a revocation list, the verifier checks it too.
Return result
The verifier returns a clear result: Valid, Expired, Revoked, or Error, with details about what was found and any issues encountered.
Hosted verification vs signed verification
There are two fundamentally different verification models in the Open Badges ecosystem, and the difference matters for long-term credential durability.
Hosted verification (OB 2.0)
The assertion is hosted at a URL maintained by the badge platform. Verification requires fetching live data from that URL. If the URL is down, the badge cannot be verified. The platform is the single point of truth.
Signed verification (OB 2.0 signed / OB 3.0)
The assertion is signed with the issuer's private key, and the signature is embedded in the badge. Verification checks the signature using the issuer's public key (fetched from a DID document or key URL). If the signature is valid, the badge is authentic, regardless of whether the issuing platform is online.
How OB 3.0 adds cryptographic proofs
In Open Badges 3.0, every credential must include a proof object in the JSON-LD. This proof contains the cryptographic signature and specifies the proof method used.
{
"proof": {
"type": "Ed25519Signature2020",
"created": "2026-03-16T10:00:00Z",
"verificationMethod": "did:web:issuebadge.com#key-1",
"proofPurpose": "assertionMethod",
"proofValue": "z5rYqP2..." // the actual signature
}
}
The verificationMethod field points to the issuer's DID and a specific key. A verifier resolves this DID, retrieves the public key, and uses it to verify the signature. If the credential content has been altered at all, even a single character, the signature check fails.
What issuers need to know about their metadata
Most badge platforms handle metadata automatically. But there are things every issuer should verify about the metadata quality in their badges:
- Criteria URL is stable: The criteria URL in your BadgeClass should point to a stable, public page describing what was required to earn the badge. If this URL breaks, verifiers may get incomplete information.
- Issuer profile URL is publicly accessible: The issuer profile must be resolvable by verifiers. Ensure your platform hosts this at a stable URL and that it returns valid JSON-LD.
- Evidence is meaningful: Where possible, include evidence that actually demonstrates what the earner did, a project URL, an assessment record reference, or event attendance confirmation. This adds significant credibility.
- Badge image is standard format: For baking to work correctly, the badge image should be a standard PNG or SVG. Unusual image formats may not support metadata embedding.
- Test your badges on an independent verifier: Use a tool like Open Badge Passport or the 1EdTech Badge Validator to check that badges issued on your platform pass verification with correct metadata.
Frequently asked questions
What is JSON-LD in the context of digital badges?
JSON-LD (JavaScript Object Notation for Linked Data) is the data format used to embed verifiable metadata inside Open Badge images and assertions. It structures badge information, who earned it, who issued it, what criteria were required, in a machine-readable format that any compliant verifier can check.
What is badge baking?
Badge baking is the process of embedding JSON-LD assertion metadata directly into a badge PNG image file. A baked badge carries its own proof of authenticity, the metadata is stored in the image's iTXt chunk and can be extracted by any verifier tool.
What data is inside an Open Badge assertion?
An assertion contains: a unique assertion ID, the BadgeClass URL, the recipient's hashed identity, issue date, optional expiration date, evidence URLs, and verification information. In OB 3.0, it also contains a cryptographic proof object.
How does a badge verifier check a badge?
A badge verifier reads the JSON-LD assertion, fetches the BadgeClass and Issuer Profile, verifies the recipient identity hash, checks expiration and revocation, and in OB 3.0 verifies the cryptographic proof. The result is a clear pass or fail with details.
Is the recipient's email visible in a badge?
No. The email is stored as a salted SHA-256 hash, a one-way transformation that makes the original email unreadable. Verifiers can confirm that a specific email matches the hash, but cannot extract the original email from the metadata.
Issue Badges with verified metadata
IssueBadge.com generates standards-compliant JSON-LD metadata for every badge, so your credentials pass independent verification and stay credible long-term.
Start Issuing Free →