JSON Logic evaluator

Client

Paste a JSON Logic rule on the left and a JSON context object on the right, then evaluate. Built-in operators only (if, comparisons, var, map, …)—ideal for portable rule trees you might ship to multiple platforms.

Learn more: JSON Logic rules

Evaluate JSON Logic rules against a JSON context object in your browser—portable rule trees with operators like if, comparisons, var lookups, and map—no upload.

Built-ins only

This page runs the reference-style JavaScript evaluator with stock operations. You cannot register custom operators here; ship those in your own app if you extend JSON Logic.

Debugging

The log operator prints to the developer console (not the result panel). Rules must stay strict JSON—comments are not allowed unless you preprocess elsewhere.

JSON Logic rule & data

?

Rules are JSON objects with exactly one operator key per node (if, var, map, …). Data on the right is the root for {"var":"path"}.

Processing uses json-logic-js in your browser. The log operator writes to the developer console. Agent URLs mirror JSON compare: left = rule JSON, right = data JSON.

Rule JSON goes left (agent URLs use left/right like compare); context object on the right. Built-in ops only—see Learn-more wiki.

Common use cases

  • Draft eligibility or routing rules as portable JSON Logic before wiring them into apps or backends.
  • Sanity-check rule outputs against the same fixture JSON you use for jq or JSONPath experiments.
  • Share minimal reproducible rule + data pairs with teammates via agent-friendly prefilled URLs.

Common mistakes to avoid

  • Expecting project-specific custom operators

    This evaluator exposes stock JSON Logic operations only. Register extensions in your own runtime when you need them.

  • Pasting JSON with comments into the rule panel

    Both panels must be strict JSON. Strip JSONC-style comments first or preprocess elsewhere.

  • Misreading where var resolves

    Paths in {"var":"score"} read from the root data object on the right—not from nested rule fragments.

FAQ

Does Toolcore run JSON Logic on its servers?

No. Parsing and evaluation stay in your browser tab using your rule and data panels.

Is this the same language as jq filters?

No—jq has its own grammar. JSON Logic uses nested JSON operator objects; use the jq tool here when you need jq syntax.

Where does log output go?

The log operator writes to the developer console. The result panel shows the rule’s return value only.

Common search terms

Phrases people search for that match this tool. See the full long-tail keyword index.

  • json logic evaluator online
  • evaluate json logic rule browser
  • jsonlogic portable rules test
  • json logic if var map example

Related utilities you can open in another tab—mostly client-side.