# NJsonSchema

> Read, generate and validate JSON Schema in .NET, and generate C# and TypeScript from it

Source: https://talira.ai/catalog/njsonschema-xypsajwk
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / validation / json schema](https://talira.ai/categories/libraries/validation/json-schema), [languages / dotnet](https://talira.ai/categories/languages/dotnet)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source (MIT).
- Free tier: yes[^1]
- Supports: [OpenAPI](https://talira.ai/standards/openapi.md)[^2], [JSON Schema](https://talira.ai/standards/json-schema.md)[^2]
- Backed by: [Rico Suter](https://talira.ai/orgs/rico-suter.md)

NJsonSchema is a .NET library by Rico Suter that reads, generates and validates JSON Schema (draft 4 and later). It validates JSON data against a schema, generates a schema from a .NET type through reflection or from sample JSON, resolves $ref references (relative, URL and file), and generates C# and TypeScript classes or interfaces from a schema. It uses [Json.NET](https://talira.ai/catalog/json-net-e2ps7nyt.md) for JSON, targets .NET Standard 2.0, handles Swagger and OpenAPI DTO schemas, and is the schema engine behind NSwag.

## Links

- GitHub: https://github.com/RicoSuter/NJsonSchema
- Docs: https://github.com/RicoSuter/NJsonSchema/wiki

## Problems it solves

- validate incoming JSON against a JSON Schema in my C# service
- generate a JSON Schema from my .NET classes
- generate C# or TypeScript classes from a JSON Schema file

## Features

- validate JSON data against a JSON Schema
- generate a schema from a .NET type or sample JSON
- $ref resolution (relative, URL and file)
- C# and TypeScript code generation from a schema
- YAML schemas through NJsonSchema.Yaml

## Trust

Overall: 0.52 out of 1.
Signals: maintenance 0.64, adoption 0.64, momentum 0.33, community 0.95, backing 0.30, extensibility 0.00.

- last commit 18 days ago
- 6 commits in the last 90 days
- latest release v11.6.2 18 days ago
- 1.6k GitHub stars
- 231 contributors
- accepts sponsorship (Github)
- backed by Rico Suter

## Related

- Works with [Json.NET](https://talira.ai/catalog/json-net-e2ps7nyt.md)

## Sources

[^1]: https://github.com/RicoSuter/NJsonSchema/blob/master/LICENSE.md (checked 29 Nov 2026)
[^2]: https://github.com/RicoSuter/NJsonSchema/blob/master/README.md (checked 29 Nov 2026)
