Developer Tools

JSON Generator — Build Arrays from Columns

Generate a JSON array from key names and one value per line. Detect numbers, booleans and null, fill missing rows and copy compact or indented JSON in your browser.

Enter one value per line for each field. Blank and missing lines become null. Numbers, true, false and null are detected after trimming surrounding whitespace; other strings keep their whitespace. Key names are trimmed and must be unique.

Limits: 100 keys, 1000 lines per field, 128 characters per key name, 20000 characters of values per field, 100000 characters of total input and 500000 output characters. Character counts use UTF-16 code units. Large numbers keep their original notation, but the application reading the JSON may round them.

Field 1
Field 2
Field 3

3 / 100 fields · Records to generate: 0

About JSON Generator — Build Arrays from Columns

Build a JSON array from columns of values

Give each field a key name and enter one value per line. Values on the same line number become one object in the output array. The field with the most lines determines the number of records; shorter fields are padded with null.

Use this tool to prepare API test fixtures or mock data without typing JSON punctuation. It creates a flat array of objects from your input, not random data.

How values become JSON types

Integers, decimals and exponent notation, such as 123, -4.5 and 1e10, become JSON numbers. Lowercase true and false become booleans. Blank lines and null become null. Other values remain strings; 007 keeps its leading zeros.

Type detection trims surrounding whitespace. Strings retain their original whitespace. Quotes, arrays and objects entered as values are treated as literal text, not parsed JSON. CSV quoting and delimiters are not interpreted. There is no option to force numeric-looking values to strings.

Number notation is preserved in the output, including large integers and exponents. A JSON reader may round numbers or exceed its supported range or precision; keeping the notation does not guarantee exact values in the receiving application.

Example: products, prices and availability

Create keys name, price and active. Enter Apple and Orange on separate lines under name, 1.20 and 1.50 under price, and true and false under active. Compact output is:

[{"name":"Apple","price":1.20,"active":true},{"name":"Orange","price":1.50,"active":false}]

The prices are example numbers with no currency implied. Choose Compact, 2 spaces or 4 spaces, then generate and copy the result. Editing an input or changing the format clears the old result so you can generate an updated version.

Prepare safe and usable test data

Use invented names, addresses and identifiers rather than real customer or personal data. Numeric-looking identifiers are often best represented as strings. Leading-zero values such as 00123 remain strings here, but adding zeros or quotes changes the value itself. For identifiers such as 12345 that must be strings, edit the generated JSON in the JSON Formatter & Validator.

Key names are trimmed and must be unique. A field containing values needs a key name. A named field with no entered value produces one null; a trailing newline adds another null record.

Limits and copying

The limits are 100 keys, 1000 lines per field, 128 characters per key name, 20000 characters of values per field, 100000 input characters in total and 500000 output characters. Character counts use UTF-16 code units. Split large inputs into batches; Compact can reduce output size.

If copying fails, retry or use Select output to copy manually. While a copy is pending or its completion is unconfirmed, avoid other copy operations: a late operation could overwrite the clipboard with older content. The warning remains until that operation settles.

Frequently asked questions

Q. Are my inputs sent to a server?
This tool processes inputs and generates JSON in your browser without sending the input content. Site-wide analytics and advertising may make separate network requests. Use dummy values for confidential or personal information.
Q. Can I create nested JSON or random data?
This tool creates a flat array of objects from values you provide. It does not generate random values or parse nested JSON in a field. For nested structures, edit the output in the JSON Formatter & Validator.
Q. What happens to blank and missing lines?
Blank lines count as records with a null value. A trailing newline adds a blank record. A field with a name but no values has one null value. Shorter fields are padded with null to match the longest field.
Q. What are the size limits?
You can use 100 keys, 1000 lines per field, key names up to 128 characters, 20000 characters of values per field, 100000 total input characters and 500000 output characters. Character counts use UTF-16 code units. Split larger inputs into batches.
Q. Can I force a number or identifier to remain a string?
There is no force-string setting. Values with leading zeros, such as 00123, stay strings. Do not add zeros or quotes as a workaround: that changes the data. Edit the generated JSON in the JSON Formatter & Validator if a numeric-looking value must be a string.

Sources and specifications

Related tools

Questions or feedback? Contact NanToo

Rate this tool
5.0(1 ratings)