jsonschema-rs
A high-performance JSON Schema validator for Python
What it is and what it does
jsonschema-rs is a JSON Schema validator written in Rust and exposed to Python, designed for high-performance validation of JSON data against schema documents. It supports JSON Schema drafts 4, 6, 7, 2019-09, and 2020-12, with automatic draft detection or explicit draft-specific validators. The package provides multiple validation modes: one-off validation, reusable validator objects, error iteration, boolean checks, and structured output conforming to JSON Schema Output v1.
The library handles standard format validation (date, email, etc.) and allows custom format validators and keywords to be defined as Python functions or classes. It supports remote reference fetching, meta-schema validation, and schema bundling. With zero runtime dependencies and pre-built wheels for modern Python versions on common architectures, it aims to be a drop-in replacement for the pure-Python jsonschema library with significantly better performance.
Use it for:
- Validate API request/response payloads against OpenAPI or JSON Schema specifications in web services
- Check configuration files or data exports conform to expected schemas before processing
- Implement domain-specific validation rules by defining custom keywords and format validators
- Migrate from pure-Python jsonschema to gain performance without changing validation logic
- Generate detailed error reports and evaluation traces for debugging schema mismatches
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
jsonschema-rs validates JSON data against JSON Schema documents using a Rust-backed implementation for high performance, supporting drafts 4 through 2020-12 with customizable format validators and keywords.
Yes. jsonschema-rs is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and offers a significant performance advantage over pure-Python alternatives with minimal install friction on modern platforms. It is suitable for production use in validation-heavy workloads and as a drop-in replacement for jsonschema. Install it if you validate JSON frequently or need to support multiple schema drafts.
Install
jsonschema-rs on PyPI
pip
pip install jsonschema-rsuv
uv add jsonschema-rspoetry
poetry add jsonschema-rsInstalling jsonschema-rs
Before you install
Medium install friction due to compiled wheels; however, wheels are pre-built for common platforms (x86_64, aarch64, i686, Windows, macOS, Linux) and Python 3.10+, so installation typically succeeds without compilation. Actively maintained with a release 5 days old.
License in practice
MIT license is permissive and imposes no significant restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install jsonschema-rs
import jsonschema_rs
schema = {"maxLength": 5}
validator = jsonschema_rs.validator_for(schema)
assert validator.is_valid("foo")
Requires Python 3.10 or later; pre-built wheels available for most platforms but may require a Rust toolchain if a wheel is unavailable for your platform.
Verify before relying
- Performance benchmarks comparing jsonschema-rs to pure-Python alternatives in real-world workloads
- Whether custom keyword and format validator APIs are stable or subject to breaking changes
- Support for remote schema references and network fetching behavior (mentioned but not detailed)
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 5 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,228,579/month — #1,951 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: jsonschema_rs-0.49.9-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl; jsonschema_rs-0.49.9-cp310-abi3-macosx_10_12_x86_64.whl; jsonschema_rs-0.49.9-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl; jsonschema_rs-0.49.9-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; jsonschema_rs-0.49.9-cp310-abi3-manylinux_2_28_aarch64.whl; jsonschema_rs-0.49.9-cp310-abi3-musllinux_1_2_aarch64.whl; jsonschema_rs-0.49.9-cp310-abi3-musllinux_1_2_x86_64.whl; jsonschema_rs-0.49.9-cp310-abi3-win32.whl; jsonschema_rs-0.49.9-cp310-abi3-win_amd64.whl; jsonschema_rs-0.49.9-cp314-cp314t-macosx_10_12_x86_64.whl; jsonschema_rs-0.49.9-cp314-cp314t-macosx_11_0_arm64.whl; jsonschema_rs-0.49.9-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; jsonschema_rs-0.49.9-cp314-cp314t-manylinux_2_28_aarch64.whl; jsonschema_rs-0.49.9-cp314-cp314t-musllinux_1_2_aarch64.whl; jsonschema_rs-0.49.9-cp314-cp314t-musllinux_1_2_x86_64.whl; jsonschema_rs-0.49.9-cp314-cp314t-win_amd64.whl; jsonschema_rs-0.49.9-cp315-cp315t-macosx_10_12_x86_64.whl; jsonschema_rs-0.49.9-cp315-cp315t-macosx_11_0_arm64.whl; jsonschema_rs-0.49.9-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; jsonschema_rs-0.49.9-cp315-cp315t-manylinux_2_28_aarch64.whl
Keywords: jsonschema, validation, rust
Tags
More JSON Schema packages
jsonschema validates Python data structures…
permissive · top 100 on PyPI
referencingResolves JSON references according to JSON…
permissive · top 100 on PyPI
jsonschema-specificationsProvides JSON Schema metaschemas, vocabularies,…
permissive · top 100 on PyPI
gensonGenSON generates JSON Schema documents from…
permissive · top 5,000 on PyPI
numpydanticNumpydantic adds type annotations and…
permissive · top 15,000 on PyPI
zcborzcbor validates and converts YAML/JSON/CBOR…
permissive · top 15,000 on PyPI
jschonValidates JSON data against JSON Schema (drafts…
permissive · top 15,000 on PyPI
pycsvschemaValidates CSV files against a schema…
permissive · top 15,000 on PyPI
check-jsonschemaA command-line tool and pre-commit hook that…
permissive · top 5,000 on PyPI
eidoValidates project metadata against PEP schemas…
permissive · top 15,000 on PyPI
jsonschema-pydanticConverts JSON Schema definitions into Pydantic…
unclear · top 15,000 on PyPI
marshmallow-jsonschemaConverts marshmallow schemas into JSON Schema…
permissive · top 5,000 on PyPI
xmlschemaValidates XML documents against XSD schemas and…
permissive · top 5,000 on PyPI
validator-collectionProvides 60+ validator functions for checking…
permissive · top 15,000 on PyPI
jqPython bindings for jq 1.8.2 that let you…
permissive · top 5,000 on PyPI