Toolvito

Calculates on this device. File exports run online.

Data Schema Generator

Paste or open CSV data and choose the kind of schema. The page reads every column, finds its type, and writes a JSON Schema, a Table Schema or an SQL table. It can also check CSV data against a schema and list every problem with its row.

Enter your values

Reads the columns of the data and writes a schema that describes them.

Your values

The first row must name the columns. At most 20,000 rows here; the box below reads larger files.

The title of a JSON Schema, the table of the SQL.

More options

The column that names each row once, such as id. It must be filled and different in every row.

Only when the data has every value the column may ever hold.

0 makes no lists.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose the button below them.

Large CSV files (made and checked on the server)

Task
Make the schema from large CSV files

Uses the settings of “Make a schema from CSV data” above. Choose up to 20 CSV files of up to 200 MB each. Every row is read; you get the JSON Schema, the Table Schema and the SQL table, and a CSV profile of the columns.

Or drop files here. CSV, TSV, TXT or TAB, up to 20 files, 200 MB each at most.

    The calculator above works in your browser. When you use a box below, the CSV files you choose there are sent to the Toolvito server with the settings above (for a check, the schema shown above); the data typed above is not sent. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.

    How to make a schema from CSV

    1. Paste the data, or open a CSV file. The first row must hold the names of the columns.
    2. Choose JSON Schema, Table Schema or SQL CREATE TABLE (and the database), and type the name of the table.
    3. Press Make the schema. Copy or download the schema, and read the table of columns: type, empty cells, smallest and largest value.
    4. For large files, choose them in the box below: the server reads every row with the same rules.

    How a column gets its type

    • true/false: every filled cell is true, True, TRUE, false, False or FALSE. 1 and 0 stay numbers.
    • Integer: whole numbers such as 42 or -7, without leading zeros. A code such as 007 or 01234 stays text, so its zeros are kept.
    • Number: numbers written as in JSON, such as 3.5, -0.25 or 6.02e23. A column of integers and decimals is a number column.
    • Date: YYYY-MM-DD and a real day (2024-02-29 is a date, 2023-02-29 is not). Date and time: as in RFC 3339, such as 2026-11-04T10:30:00Z or 2026-11-04T16:00:00+05:30. A time without Z or an offset stays text.
    • Text: everything else. A text column gets the format uuid, email or uri when every value looks like one (uri: addresses that start with http:// or https://).
    • An empty cell is a missing value. A column without empty cells is required.

    What each schema holds

    • JSON Schema 2020-12: an array of rows; each row is an object with one property for each column. A column with empty cells may be null or left out. Unknown columns are not allowed (additionalProperties: false).
    • Table Schema (Frictionless Data): a list of fields with their types, formats and constraints, missingValues [""] and, when you name one, the primary key. Dates and times with offsets other than Z get format any.
    • SQL: integers as INTEGER (INT in MySQL) or BIGINT by their size, decimals as exact NUMERIC(p,s) or DECIMAL(p,s) with the digits found in the data, dates as DATE, dates and times as TIMESTAMP WITH TIME ZONE (PostgreSQL) or DATETIME (MySQL), true/false as BOOLEAN. SQLite gets INTEGER, REAL and TEXT, with dates as ISO 8601 text.
    • Limits copied from the data (smallest, largest, longest) and lists of allowed values are added only when you ask for them under More options: a sample seldom holds every value the column may ever hold.

    Checking data against a schema

    • Paste a JSON Schema or a Table Schema, or open one. Press Check the data: every problem is listed with its row (row 1 is the first row under the names), column and value.
    • For a JSON Schema each row is checked as an object: a cell of a number column is read as a number, true/false of a boolean column as true or false, and an empty cell is left out. The page checks type, required, properties, additionalProperties, enum, const, the number limits, the text lengths, pattern and the formats date, date-time, email, uri and uuid; the box below checks every keyword with the Python jsonschema library.
    • A JSON Schema pattern is not anchored (it may match a part of the text); a Table Schema pattern must match the whole value.

    Limits you should know

    • The page reads up to 20,000 rows; the server box reads up to 20 million rows in files of up to 200 MB.
    • Only the first row can hold the names, and the files must be UTF-8 text.
    • The schema describes the data you give. It cannot know the meaning of a column, relations between tables or values that do not appear in the data.
    • JSON, XML and YAML documents are handled by the Data Schema Generator & Validator.

    Related tools