Toollet
Search by task or app nameSearchContact us
Pricing

Generate JSON

Enter field names and values for each column, one per line, to create a JSON array that combines values on the same row into one record. Choose strings or auto-detection for each column to handle product codes and numbers separately. Choose formatting or one-line minification, then copy the entire generated JSON or save it as result.json. Missing rows are filled with null.

Fields and values

2 columns

Values on the same row form one record. Missing rows become null.

Column 1

2 rows

Column 2

2 rows
Up to 100 columns

Adjust readability without changing values or field names.

What you can do

Combine column inputs into one record

Enter a field name and one value per line in each column. Values with the same row number are combined to create an array of objects.

Choose strings or automatic detection

Keep product codes and similar values as strings. Automatic detection identifies numbers, true, false and null.

Review and get the JSON

Choose readable indentation or minified output, then copy the entire generated JSON or save it as a file.

How to use

  1. Enter field names and values

    Name each column and enter one value per line. Use Add column for any additional fields you need.

  2. Check value types

    Choose String for columns where even numeric-looking values should be strings. Check that values with the same row number form one record.

  3. Generate and save JSON

    Choose the indentation, then press Generate JSON to review the result. Copy the generated JSON or save it as result.json.

Useful when

Create sample data for APIs

Prepare a JSON array from field names and value columns for example requests or checking screens.

Provide product codes and similar values as strings

Specify sequences of digits as strings and combine different types, such as identifiers and quantities, in the same data.

How rows and value types are handled

The same row number forms one record

The first row in each column forms the first object, and the second row forms the next object. Generation matches the column with the most rows.

Empty rows and missing rows are different

An empty row becomes null with automatic detection, or an empty string with String selected. Where a row itself is missing, the value is null with either setting. A trailing line break is also counted as an empty row.

Keep values as strings

Choosing String outputs even 42, true and null as strings. Leading and trailing spaces are also retained. You do not need to add quotation marks yourself.

Automatic detection and large numbers

Automatic detection identifies JSON number notation, true, false and null, and treats everything else as strings. Large numbers are also output in their original notation, but choose String if they may be rounded where they are used.

Creates an array with a single level

A period in a field name remains part of that name. Text resembling arrays or objects in values is not parsed as nested JSON.

Frequently asked questions

Can I output product codes as strings?

Yes. Choose String as the value type for that column. Values that look numeric, such as 42, are also output as strings. You do not need to add zeros or quotation marks to the input values themselves.

What happens if columns have different numbers of rows?

Matches the column with the most rows and fills missing rows with null. It does not repeat the last value of shorter columns or close up the rows.

Are empty rows or trailing line breaks ignored?

No. A trailing line break also creates one empty row. It is output as null with automatic detection, or as an empty string when String is selected.

Can I use the same field name?

Generation is not possible if field names are duplicated after removing leading and trailing spaces. Columns with values require field names. Added columns with both an empty name and empty values are excluded from output.

How much can I enter?

Up to 100 columns, 1,000 rows, 128 characters per field name and 100,000 characters across field names and values. There are also limits on the total number of generated values and other quantities, so you may need to split the input depending on the combination, even when both the column and row counts are within their individual limits.

Can I also create CSV files or nested JSON?

This screen creates an array of objects with a single level from column values. It does not parse CSV quotation marks or delimiters, or automatically generate nested structures.

What happens to the result when I change the input?

Changing field names, values, types, the number of columns or indentation removes the previous result. Generate it again. Clearing the input returns to one empty column while retaining the indentation setting.

Input and results

Input
Field names and one value per line in each column. Files are not loaded.
Type
Choose String or automatic detection for each column.
Format
2 spaces (default), 4 spaces, tabs or minified.
Output
Copy the entire JSON array, or save as result.json.

Current settings

Search tools