JSON to Yup Schema
NewGenerate Yup validation schemas from JSON data.
convertyupvalidation
Read the guideShortcuts:⌘ KSearch?HelpD MDark modeG TAll tools
Frequently Asked Questions
Will this mark fields as required?
No. It generates the structural schema shape, but it does not append .required() even when a key appears in every sample.
How does it handle nulls?
A null-only value becomes yup.mixed().nullable(). Other inferred types get .nullable() only when null appears in the sample data.
Does it inspect all items in an array?
Yes. Array item shapes are merged across the sample array, and integer/float mixes collapse to yup.number().
Will it infer email, URL, min, max, or regex rules?
No. It only infers structural type information from the JSON sample.
What is the exported schema name?
It uses your root name to build a camelCase export such as rootSchema and prepends import * as yup from 'yup';