Skip to main content

PyPI version Supported Python versions Build status ReadTheDocs status pre-commit.ci status Zenodo DOI

jsonschema is an implementation of the JSON Schema specification for Python.

>>> from jsonschema import validate

>>> # A sample schema, like what we'd get from json.load()
>>> schema = {
...     "type" : "object",
...     "properties" : {
...         "price" : {"type" : "number"},
...         "name" : {"type" : "string"},
...     },
... }

>>> # If no exception is raised by validate(), the instance is valid.
>>> validate(instance={"name" : "Eggs", "price" : 34.99}, schema=schema)

>>> validate(
...     instance={"name" : "Eggs", "price" : "Invalid"}, schema=schema,
... )                                   # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
    ...
ValidationError: 'Invalid' is not of type 'number'

It can also be used from the command line by installing check-jsonschema.

Features

Installation

jsonschema is available on PyPI. You can install using pip:

$ pip install jsonschema

Extras

Two extras are available when installing the package, both currently related to format validation:

  • format

  • format-nongpl

They can be used when installing in order to include additional dependencies, e.g.:

$ pip install jsonschema'[format]'

Be aware that the mere presence of these dependencies – or even the specification of format checks in a schema – do not activate format checks (as per the specification). Please read the format validation documentation for further details.

About

I’m Julian Berman.

jsonschema is on GitHub.

Get in touch, via GitHub or otherwise, if you’ve got something to contribute, it’d be most welcome!

If you feel overwhelmingly grateful, you can also sponsor me.

And for companies who appreciate jsonschema and its continued support and growth, jsonschema is also now supportable via TideLift.

Release Information

v4.26.0

  • Decrease import time by delaying importing of urllib.request (#1416).

Release files for jsonschema 4.26.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jsonschema 4.26.0
File Size Uploaded
jsonschema-4.26.0.tar.gz 366.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jsonschema 4.26.0
File Interpreter ABI Platform
jsonschema-4.26.0-py3-none-any.whl Python 3 none any Details

Total release size: 457.2 kB

Release files / jsonschema-4.26.0.tar.gz

Download URL jsonschema-4.26.0.tar.gz
Size 366.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0c26707e2efad8aa1bfc5b7ce170f3fccc2e4918ff85989ba9ffa9facb2be326
BLAKE2b-256 checksum
How to use checksums
b3fce067678238fa451312d4c62bf6e6cf5ec56375422aee02f9cb5f909b3047
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 7, 2026.

Transparency log

Release files / jsonschema-4.26.0-py3-none-any.whl

Download URL jsonschema-4.26.0-py3-none-any.whl
Size 90.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce
BLAKE2b-256 checksum
How to use checksums
6990f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

4.26.0 This release

2 release files

4.25.1

2 release files

4.25.0

2 release files

4.24.1

2 release files

4.24.0

2 release files

4.22.0

2 release files

4.21.1

2 release files

4.21.0

2 release files

4.20.0

2 release files

4.19.2

2 release files

4.19.1

2 release files

4.18.4

2 release files

4.18.3

2 release files

4.18.2

2 release files

4.18.1

2 release files

4.17.3

2 release files

4.17.1

2 release files

4.15.0

2 release files

4.14.0

2 release files

4.13.0

2 release files

4.12.1

2 release files

4.12.0

2 release files

4.11.0

2 release files

4.10.3

2 release files

4.10.2

2 release files

4.10.1

2 release files

4.10.0

2 release files

4.9.1

2 release files

4.9.0

2 release files

4.8.0

2 release files

4.7.2

2 release files

4.7.1

2 release files

4.7.0

2 release files

4.6.2

2 release files

4.6.1

2 release files

4.6.0

2 release files

4.5.1

2 release files

4.5.0

2 release files

4.4.0

2 release files

4.3.3

2 release files

4.3.2

2 release files

4.3.1

2 release files

4.3.0

2 release files

4.2.1

2 release files

4.2.0

2 release files

4.1.2

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.2.0

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.6.0

2 release files

2.5.1

3 release files

2.5.0

2 release files

2.4.0

3 release files

2.3.0

3 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.8.0

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page