Text to JSON

Paste INI/conf, key=value (.env / .properties), logfmt, CSV/TSV, or /etc/passwd-style text and get clean, structured JSON. The format is auto-detected (switch the Report output to see which was chosen), types are inferred, and everything runs locally in your browser — nothing is uploaded.

Try:
JSON

About this tool

Paste a block of loosely-structured plain text and get clean JSON back. One box handles five shapes and auto-detects which one you pasted:

Lines starting with # or ; are treated as comments and skipped. Everything runs locally in your browser — nothing is uploaded.

Options

Worked examples

logfmt log lines → array of objects

level=info msg="server started" port=8080
level=error msg="connection refused" code=502

becomes

[
  { "level": "info", "msg": "server started", "port": 8080 },
  { "level": "error", "msg": "connection refused", "code": 502 }
]

INI config → nested JSON

app = demo

[server]
host = localhost
port = 8080

becomes { "app": "demo", "server": { "host": "localhost", "port": 8080 } }.

CSV → array of objects (with type inference)

name,age,admin / Alice,30,true becomes [{ "name": "Alice", "age": 30, "admin": true }] — the header row supplies the keys, and 30/true are inferred as a number and a boolean.

Limits & edge cases

FAQ

How does auto-detect decide which format I pasted?

It scans the non-comment lines in order: a [section] header means INI; a line packing two or more space-separated key=value pairs means logfmt; consistent colon-delimited lines with no = mean passwd; lines that mostly carry one = or : per line mean key=value; and a delimiter that splits rows into a consistent 2-plus columns means CSV. If nothing matches it falls back to key=value. Set Output as to Report to see the detected_format it landed on, and pin Input format if the guess is wrong.

Why did my numbers or booleans come out as strings (or vice versa)?

By default Detect booleans & numbers is on, so unquoted true/false become booleans and numeric values become numbers. Two things keep a value a string: it was quoted in the source (port = "8080" stays "8080"), or you turned the option off to preserve values exactly — useful for zip codes or IDs with leading zeros like 007. An empty value becomes null when detection is on.

What's the difference between JSON, NDJSON, and Report output?

JSON is the parsed value itself — a nested object for INI and key=value, an array of objects for logfmt, CSV, and passwd. NDJSON (JSON-Lines) emits one compact record per line, which is what many log and data pipelines ingest. Report wraps the result as { detected_format, record_count, data } so you can confirm which format auto-detect chose and how many records it found.

Is my data uploaded anywhere?

No. The conversion runs entirely in your browser via WebAssembly — the text you paste never leaves your machine, so it's safe for config files, credentials, or log lines you'd rather not send to a server.

Can it handle CSV with commas inside quoted fields, or tab/semicolon files?

Yes. The delimiter is auto-sniffed from comma, semicolon, tab, and pipe, and RFC-4180 double-quoting is honored — "a, b" stays a single field and "" inside a quoted field becomes a literal ". Blank column headers fall back to field1, field2, and so on. Pin Input format to CSV / TSV if a table with only one column would otherwise be read as key=value.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool text-to-json 'level=info msg="server started" port=8080
level=error msg="connection refused" code=502'

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/text-to-json/?text=level%3Dinfo%20msg%3D%22server%20started%22%20port%3D8080%0Alevel%3Derror%20msg%3D%22connection%20refused%22%20code%3D502&format=auto&detect_types=true&pretty=true&output=json

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.