NoSQL Validator
Validate a JSON document against a JSON Schema or MongoDB $jsonSchema
Examples
Validate a user document
{ "name": "Ada", "age": 36 } against a schema requiring name (string) and age (int, min 0)VALID — both required fields are present and correctly typed.Load the sample to see a document and a MongoDB $jsonSchema validator checked field by field.
Catch a wrong type
{ "age": "thirty-six" } against { age: { bsonType: "int" } }age — Expected type int, got string.The validator points at the exact field path so you can fix the document or the schema.
About this tool
Document stores such as MongoDB can enforce a shape at write time with a validator built from JSON Schema, or MongoDB's $jsonSchema. Authoring that schema by hand is error-prone, and a single wrong keyword silently lets bad data in.
Paste a document and a schema and the validator checks every node: the expected type (including BSON aliases like int and bool), required properties, additionalProperties:false, array items, enum membership, string minLength/maxLength and pattern, and numeric minimum/maximum. Each failure points at the exact field path. It supports a practical subset of draft-07 plus MongoDB bsonType and the $jsonSchema wrapper.
How to use this tool
Paste the document
Enter the JSON document you want to validate on the left.
Paste the schema
Enter a JSON Schema, optionally wrapped in { "$jsonSchema": { ... } }, on the right.
Read the result
A VALID badge means it matches; otherwise each error names the offending field path and why.
Iterate
Fix the document or correct the schema and the result updates live.
Common mistakes
Mistake:Forgetting required.
Fix:Listing a property in properties does not make it required — add its name to the required array.
Mistake:Using 'number' when MongoDB wants 'int'.
Fix:Use bsonType (e.g. 'int', 'long', 'double') for MongoDB validators; this tool understands both.
Frequently asked questions
Which JSON Schema version is supported?
A practical subset of draft-07: type/bsonType, properties, required, additionalProperties, items, enum, pattern, min/maxLength, min/maxItems, and minimum/maximum.
Can I paste a MongoDB $jsonSchema validator?
Yes. Wrap it as { "$jsonSchema": { ... } } exactly as you would for db.runCommand({ collMod }), or paste the schema object directly.
Is my document or schema uploaded?
No. Validation runs entirely in your browser.
Related guides
Build MongoDB Queries Without Memorizing Operators
Find filters and aggregate pipelines from visual rows — $eq, $in, $regex, $exists, and how AND/OR logic maps to $and and $or arrays.
Two SQL Reviews Every Query Should Pass
A security review and a performance review for SQL. Catch injection signatures before production, then strip the anti-patterns that make a query slow — without needing a live database.
Validate MongoDB Documents With $jsonSchema
Stop bad documents at the door. Build a JSON Schema or MongoDB $jsonSchema visually, validate documents against it, and apply it as a collection validator — all in your browser.
References & standards
Related tools
Base64 Toolbox
Professional Base64 workspace for text, files and images with Base64URL, MIME, Data URI, strict validation, image preview and ready-to-use snippets.
C# to VB.NET Converter
Convert a subset of C# — classes, methods, variables, loops — into VB.NET
CSV Data Viewer
Paste CSV and browse rows in a sortable table with delimiter detection
CSV to Chart
Paste or upload CSV data and generate bar, line, pie, or doughnut charts. Export as PNG.
CSV to JSON Converter
Paste CSV data and convert it to pretty-printed JSON instantly — supports custom delimiters, header row toggling, and value trimming.
CSV to Markdown Converter
Convert CSV to a Markdown table and Markdown tables back to CSV