JWT Generator
Build and sign a JWT with HS256, HS384 or HS512 for testing.
Infer a draft-07 JSON Schema from a sample document in one step.
The JSON Schema Generator infers a draft-07 schema from one sample document: types for every field, a required list, nested definitions, and detected string formats such as email, date-time, uuid and uri.
Writing a JSON Schema by hand for an API you did not design is slow and error-prone. Paste one real response instead and the generator writes the schema: types for every field, a required list, nested object and array definitions, and detected string formats.
Format detection is what makes the output immediately useful. A value that looks like an email, a date, a date-time, a UUID, a URI, a hostname or an IP address is annotated with the matching format keyword. Arrays are handled by describing every element and merging the descriptions, so an array of slightly different objects produces one schema covering all of them, with the keys that are not always present left out of required.
Values that look like an email, date, date-time, uuid, uri, hostname or IP address are annotated with the matching format keyword.
Every element is described and the descriptions combined, so an array of slightly different objects produces one schema covering all of them.
A key missing from any element of an array is left out of required automatically, rather than being asserted from the first record.
Turn additionalProperties off to catch typos, or leave it open so an upstream API adding a field does not break your validation.
The draft with the widest library support, so the schema works in almost any validator without configuration.
One real response is enough; a representative one produces a better schema.
Choose whether to emit a required list, detect string formats and forbid additional properties.
Check that optional fields really are optional and that inferred formats match your intent.
Take the schema to your clipboard or save it as a .json file.
Draft-07, declared in the $schema keyword. It is the draft with the widest library support, and most validators accept it without configuration.
Every key present in the sample is required by default. If your sample is an array of objects, a key missing from any element is left out of required automatically.
It infers from one sample, so it cannot know that a field which happens to be an integer is sometimes a decimal, or that a null is really an optional string. Treat the output as a first draft and adjust.
It makes the schema reject any key it does not name. That is stricter and catches typos, but it also breaks the moment the API adds a field, so leave it off for schemas that validate third-party data.
What people who use the JSON Schema Generator think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the JSON Schema Generator. It takes half a minute and no account.
Write the first reviewBuild and sign a JWT with HS256, HS384 or HS512 for testing.
Break an emoji into its code points, modifiers and joiners.
Every regex token, searchable, with an example of what it matches.
Turn a JSON object into a TOML document with proper tables and arrays of tables.
Convert file permissions between octal, symbolic and checkboxes.
Convert YAML config into JSON and see exactly how each value was typed.
Parse Set-Cookie and Cookie headers, and check the security flags.
Convert JSON into XML, with control over attributes, arrays and the root element.