Text

or drop a file here, or paste code below
Read the text as

No input yet.

JSON

JSON output

Files never leave your browserHow?

Text, INI and key=value to JSON

This converter turns plain text into JSON. Lines become an array, key = value lines (with INI [sections]) become an object, and a table with a header row becomes an array of objects – detected automatically.

Last updated:

How it works

  1. Paste the text

    Paste a list, a .conf/.ini/.properties file, an .env file or a tab-separated table, or open the file.

  2. Confirm the structure

    Auto-detect picks lines, key = value pairs or a table; choose one yourself and set the separator, nesting and typing.

  3. Copy the JSON

    Pick the indent, sort keys or JSON Lines, then copy, download or open the result in the JSON Viewer.

Features

  • Three shapes

    One item per line → ["…"]; key = value → {"key": "value"}; a header row with tab, comma, semicolon or pipe columns → [{"col": …}].

  • INI sections and dotted keys

    [database] sections become nested objects, and server.port = 80 can become {"server": {"port": 80}}.

  • Typed values

    true, false, null and plain numbers become JSON types; quoted values and everything else stay strings. Turn it off to keep all values as text.

  • Repeated keys

    A key that appears twice becomes an array of its values, or the last value wins – your choice.

  • Output for every use

    2 or 4 spaces, tabs or minified JSON, alphabetically sorted keys, or JSON Lines with one record per line.

Limits & privacy

Text up to 20 MB; inputs over 256 KB are converted in a background worker. Comments (# or ;) are skipped in key = value files, and a value in quotes keeps its # characters. Nothing is uploaded. See the privacy page.

FAQ

How do I convert a text file to JSON?

Paste the text or open the file. The structure is detected; check the JSON on the right and download it as .json.

How do I turn a list of lines into a JSON array?

Choose one item per line. Each non-empty line becomes one array element; numbers become numbers when typing is on.

Can I convert an INI or .properties file to JSON?

Yes. key = value and key: value lines are read, # and ; comments are skipped, and [sections] become nested objects.

What is JSON Lines?

One JSON value per line instead of one array. It is used for logs, BigQuery and machine-learning datasets; turn on JSON Lines to get it.

Why did "007" stay a string?

Numbers with leading zeros are not valid JSON numbers, so they stay strings to keep the zeros.

Related tools