Skip to main content
CuteJSON
↑↓ Navigate Enter Select Esc Close

JSON Schema Generator

Turn a document you already have into a JSON Schema that describes it, and see which keys the sample says are optional.

Back to all tools

Keyboard shortcuts

These work wherever the matching action exists on this page.

Open the command palette
Ctrl/Cmd + K
Run the main action
Ctrl/Cmd + Enter
Format
Ctrl/Cmd + Shift + F
Minify
Ctrl/Cmd + Shift + M
Copy output
Ctrl/Cmd + Shift + C
Open file
Ctrl/Cmd + Shift + O
Download output
Ctrl/Cmd + S
Close this dialog
Esc
Open this dialog
F1 / ?

Local data

Everything below is stored only in this browser, on this device. None of it is ever sent anywhere, and closing this dialog is not required for that to stay true.

Unsaved drafts
Tools with remembered options

Recently opened files

    No files opened yet on this device.

    Share via link

    The content is packed into the part of the link after the # sign, which browsers never send to a server. Nothing here is uploaded to cutejson.com or anywhere else.

    Shares the first input on this page. On a tool with more than one, only that one is included.

    Nothing to share yet. Paste or type something first.

    Input

    Load from a URL

    Fetches the URL directly from your browser and loads whatever text it returns into this pane.

    Output

    The result appears here.

    Runs entirely in your browser. Nothing you paste is uploaded, and you can confirm that in your browser Network tab.

    About this tool

    A schema generated from a sample is a description of what was in the sample, not a specification, and this page treats it that way. An array is read as a list of records and every element is merged into one description, so a key missing from any record comes back as not required rather than quietly required. A field that is a whole number everywhere is called an integer, and one fraction anywhere makes it a number. A string format is only claimed when every string in that position matched the same pattern, which is what stops one lucky value from turning a free text field into a date. Two genuinely different types in one position become a type array. What this cannot do is know about the records you did not paste, so read the output as a starting point and widen it where your data is looser than your sample.

    How to use

    1. Paste a document, or several records in an array, into the input pane.
    2. Choose the draft, and whether to detect string formats and mark required keys.
    3. Copy the schema or download it as a file.

    Keep reading

    How to generate a JSON Schema from a real sample Read the guide