{} JSON
Convert Text to JSON
Convert text lines to JSON arrays, key-value pairs to JSON objects, and CSV data to JSON โ with type detection, pretty-print and minify options.
Input Text
JSON Output
Conversion modes explained
Choose the mode that matches your input format. Each mode produces valid, well-formed JSON instantly as you type.
[ ] Lines to Array
Each line becomes a JSON array element. Numbers, booleans and null are auto-detected. Skip blanks and trim options for clean output.
{ } Key-Value to Object
Lines in key=value format become JSON object properties. Choose = : tab or | as separator. Values auto-typed.
CSV to JSON Array
CSV data with a header row becomes an array of objects โ ideal for importing tabular data into APIs and databases.
Split to Array
Split a single line by any delimiter (comma, space, tab, pipe) into a JSON array. Great for comma-separated values on one line.
Frequently asked questions
How do I convert text lines to a JSON array?
Paste your text lines into the input box, select "Lines to Array" mode, and the tool converts each line to a JSON array element instantly. Empty lines are skipped by default.
How do I convert key-value pairs to JSON?
Select "Key-Value to Object" mode. Enter lines in key=value or key:value format and the tool builds a JSON object where each key maps to its value. Values that look like numbers, booleans or null are auto-converted.
How do I convert CSV to JSON?
Select "CSV to JSON" mode. Paste CSV data with a header row in the first line. The tool creates an array of objects using the header values as keys for each subsequent row. Commas and quotes are handled correctly.
Can I choose between string and number types?
Yes. Enable "Auto-detect types" and values that look like numbers (42, 3.14), booleans (true, false) or null will be converted to their proper JSON types. Disable it to keep all values as strings.
What is the difference between pretty-print and minify?
Pretty-print adds indentation and line breaks making JSON human-readable. Minify removes all unnecessary whitespace producing the smallest possible JSON โ ideal for production APIs and reducing transfer size.
๐ Related tools