⊟ kar-conform

Paste a JSON Schema contract and one or more JSON outputs an AI tool produced. Get a deterministic PASS/FAIL per output — exact violation, exact path — plus a canonical SHA-256 hash so you can tell "reformatted the same answer" apart from "quietly changed the answer" across reruns. Everything runs in your browser; nothing is sent anywhere; the same inputs always produce the same verdict, on this page or anyone else's copy of it.

no network calls no AI judge deterministic third-party re-runnable works offline

Start here

Kar-Conform tells you whether JSON outputs match their JSON Schema contract, every violation with its exact path, and whether two runs really differ or were only reformatted. It runs entirely in this page: nothing you paste is sent anywhere, and no AI judges anything.

  1. Paste the JSON Schema and one or more candidate outputs above (or press Load example).
  2. Press Verify all candidates.
  3. Read the verdict: PASS when every output conforms; FAIL or SOME_FAIL otherwise, with each violation and its path.
  4. Compare the outputs' canonical hashes: equal hashes mean the same data, however it was formatted.

Below the tool: how it works · words on this page · blueprint · roll it out · for a business · FAQ

What this actually checks (read before trusting a verdict)

In scope

  • Structural conformance to a JSON Schema contract: type, required, properties, additionalProperties, patternProperties, items (incl. tuple form), enum, const, minimum/maximum/exclusiveMinimum/exclusiveMaximum/multipleOf, minLength/maxLength/pattern, minItems/maxItems/uniqueItems, allOf/anyOf/oneOf/not, local $ref into $defs/definitions.
  • Canonical form: object keys sorted, whitespace stripped, numbers via standard JS number-to-string — so two JSON blobs that mean the same thing hash the same, regardless of key order or spacing.
  • Cross-run consistency: among the candidates that pass, are they canonically identical (stable) or do they diverge (silent drift between calls)?

Limits: what it does not check

  • It checks the common rules of JSON Schema (2020-12), not all of them. A schema that uses a rule it does not check (if/then/else, prefixItems, dependentRequired, $dynamicRef, a $ref to another file or URL, and the rest) FAILS every output with a message naming the rule and where it sits. It never passes an output against a rule it did not check. Version 1 skipped such rules silently; version 2 refuses them.
  • format is checked for email, date, date-time, URI and UUID only, each by a simple pattern rather than the full official grammar: a format failure is a strong hint, not a final verdict. Any other format name (hostname, ipv4…) is not checked, as the JSON Schema standard allows.
  • It cannot tell you the JSON is true, only that it is shaped the way the contract said it would be. {"city": "Paris", "country": "Germany"} has the right shape, two strings, and is still wrong.
  • Two outputs count as the same only if they are exactly the same data once key order, spacing and number spelling are evened out: 1.0 and 1 match, "1" and 1 do not. "Nearly the same" never counts as the same.

✓ Self-test (runs automatically, on this page's own bundled example)

Running…

1 Contract (JSON Schema)

contract hash: —

2 Candidate outputs

One per box. Add every run you want compared — e.g. the same prompt called three times.

↻ How to reproduce this verdict without this page

  1. Validate each candidate JSON against the contract's JSON Schema keywords listed above, in any conformant validator, recording every violation as (path, message).
  2. Canonicalize any JSON value v recursively: objects → {} with keys sorted ascending by UTF-16 code unit and re-emitted as "key":canon(value) joined by commas; arrays → [] with elements in original order; strings → standard JSON string escaping; numbers → the ECMAScript Number.prototype.toString() form (reject NaN/Infinity, normalize -0 to 0); true/false/null literally. No inserted whitespace anywhere.
  3. UTF-8 encode the canonical string and take SHA-256, hex-encoded lowercase. That is the hash shown per candidate and for the contract itself.
  4. Two candidates with the same hash are, by construction, the same JSON value — independent of formatting, spacing or key order. Two passing candidates with different hashes proved the AI's output actually changed between runs, not just its formatting.

How it works

schemaoutputsevery keyword checkedcanonical formSHA-256 of eachPASSFAILSOME_FAILpaths
  1. Each output is checked against the schema's keywords (the supported subset is listed in SKILL.md) and every violation is listed with its path, such as $/email.
  2. Each output is rewritten in one canonical form and hashed with SHA-256, so a reformatted answer has the same hash and a real change does not.
  3. The verdict covers every output given, so drift between runs of the same prompt shows at once.

Words on this page

JSON Schema
A standard way to write down the shape an output must have: which fields, of what type, which are required.
Canonical hash
Keys sorted, spaces removed, numbers in one spelling, then SHA-256. {"b":2,"a":1} and { "a": 1.0, "b": 2 } give the same hash, so two runs that agree show as one.
Best-effort format check
An email, date, date-time, URI or UUID is checked by a simple pattern, not the full official grammar, so a format failure is a strong hint rather than a final verdict. Any other format name (hostname, ipv4…) is not checked at all, as the JSON Schema standard allows.
Kernel
The small piece of code that decides every verdict; the rest of the page only shows what it decided. Here it is the block inside this page, copied byte for byte into kernel.mjs (the file the tests run) and into the script, so all three are the same code.
SHA-256 receipt
A 64-character fingerprint of the input and the verdict. Anyone with the same input gets the same fingerprint; change one character and it changes completely.
Deterministic
No AI model, no random numbers and no clock go into a verdict, so the same input gives the same verdict on any machine, every time.
No AI judge
No language model decides anything. The verdict comes from fixed rules you can read in kernel.mjs.
Mutation gate
A test of the tests. witness makes small deliberate changes to the kernel, one at a time: for example it turns if (count > 0) into if (count >= 0), then runs the tests. Every change must make a test fail. A change no test notices has survived: it would mean no test checks what happens at that exact point. A change reviewed as equivalent cannot alter any result (both versions give the same answer for every input), and the reason is written down and checked.
CI
Continuous integration: GitHub re-runs every test and the gate on its own computers on every change, and the runs are public.
In the browser
The page does the work on your computer. Nothing you paste is sent to a server.
MIT licence
An open-source licence: you may use, copy, change and build products with it, free, as long as the copyright notice stays.
Sourced figures
Every number in the cost case comes from a published source (the UK median wage and UK inflation, from the ONS), linked under the table.

Blueprint

Roll it out

  1. Pick one place where this check is done by hand today, or skipped, and the person who owns it.
  2. Try it here on real examples from that place. Nothing leaves the page.
  3. Put it in the flow. Run node scripts/kar-conform.mjs schema.json output1.json in CI or a script (Node.js 20 or later, no dependencies). Exit code 0 means every output passes, 1 means at least one fails, 2 means the input could not be read. An AI agent can run the same script as a skill.
  4. Keep the receipts with the work they checked, so anyone can recompute a verdict later.
  5. Measure the difference with the cost case below.

For a business

Kar-Conform turns a check that is usually done by eye, or not at all, into a verdict anyone can recompute: the same input gives the same answer and the same SHA-256 receipt on any machine, with no AI judging it.

The cost case, on your numbers

What the checking costs today against running the tool. Staff time is at the UK median hourly wage with on-costs left out, so this is a floor; later years rise with UK inflation (CPI). Change any box to your own numbers and the table recalculates as you type.

How it is worked out. Today: checks a year (per week × 52) × minutes per check × the median hourly wage, plus anything you pay for a tool now. With the tool: the share it replaces takes the seconds you enter instead of the minutes, and the rest is still checked by hand. Each later year rises by one more year of inflation.

yearchecking by handwith Kar-Conformsaved

Against what you do now

Security, data protection and deployment

Support and ownership

Supplied by AI Native Solutions; start through that site. Support, any service level, warranty and liability are agreed per deployment, in each deployment's agreement. The software is MIT and keeps running without us.

Where it stops, answered straight

The case for the board

A check that anyone can recompute replaces a check that has to be trusted, at no licence cost, without sending your data anywhere. Its logic is the code on this page, and its tests are themselves tested.

FAQ

Why the canonical hash?
Because a model can return the same data in a different order or spacing. The hash tells you whether two runs really differ.
Can an agent run it?
Yes. The same kernel ships as a one-file Node.js script (scripts/kar-conform.mjs), usable as an agent skill after every structured call.
What happens with bad, empty or very large input?
An output that is not valid JSON FAILS with the parser's message, and the other outputs are still checked. A schema rule it does not check (such as if/then/else, prefixItems, dependentRequired or a $ref to a URL) FAILS every output with a message naming the rule and where it sits, instead of passing quietly. Version 1 skipped those rules silently, so an output that broke an if/then rule came back PASS; version 2 refuses the schema. A schema file that cannot be read or parsed is refused (exit 2).
What do I need to run it?
For the page, a modern browser; there is nothing to install. For the script, Node.js 20 or later (free from nodejs.org; node --version shows which one you have): download scripts/kar-conform.mjs (one file, no dependencies, no npm install) and run it with no arguments to see how to call it.
Does it need the internet or an account?
No. The page works once loaded, and the script runs offline. Nothing is uploaded.