Turn a column of lines into a JSON array, with type inference, dedupe and pretty print, and split it back to lines, all in your browser
- Runs locally
- Category Format Converter
- Best for Turning pasted content or local files into a handoff-friendly format.
What this tool does
Free list to JSON array converter. Paste one item per line and get a clean JSON array of scalars back, ready to drop into a config file, a test fixture, an API request body or a SQL seed script. Type inference turns lines that look like numbers, true, false or null into real JSON primitives, so 42 becomes the number 42 instead of the string "42"; turn it off when you want every element kept as a string. One pass also handles the housekeeping most people do by hand: trim each line, skip blank lines, remove duplicates and sort. Choose compact output for one tight line or pretty print at two or four spaces for a readable diff. Quotes, backslashes, tabs and Unicode are escaped correctly because the output goes through real JSON serialization, not string glue. Need the inverse? Switch direction and paste a JSON array to fan it out to one element per line, with a friendly error if the JSON is malformed. Everything runs in your browser tab with one-click copy and a shareable URL that reproduces your exact input and options. 100% client-side, nothing uploaded.
Tool details
- Input
- Text + Numbers + Structured content
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 9 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Format Converter · Developer
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How List to JSON Array fits into your work
Use it when the main problem is getting content from one practical format into another.
Conversion jobs
- Turning pasted content or local files into a handoff-friendly format.
- Previewing a conversion before you use it in a larger workflow.
- Cleaning small format mismatches without opening a full editor.
Conversion checks
- Try a small sample first when the source format is messy.
- Check character encoding, separators, and line endings after conversion.
- Keep the source until the converted output has been reviewed.
Good next steps
These links move the current task into a more complete workflow.
- 1 JSON Lines Formatter Validate JSONL line by line, pretty-print it, convert to a JSON array, or export a CSV-like table locally. Open
- 2 Properties ⇄ JSON Converter Java/Spring .properties to JSON and back, with dotted-key nesting, line continuations and full escape handling, all in your browser Open
- 3 List to Comma Separated Turn a column of lines into a comma-separated string — add quotes, prefix/suffix, dedupe, sort, or split it back — browser-only Open
Real-world use cases
Seed a config or fixture from a pasted column
You copy a column of country codes or SKU ids and need a JSON array for a config file. Paste it, leave type inference off so codes stay strings, then copy the array straight in. No hand-typed brackets, no missing comma on line 40 breaking the parse.
Read a one-line JSON array a teammate sent
A colleague pastes a long single-line JSON array and asks what is in it. Switch to the reverse direction, paste it, and read one element per line. Strings show without quote noise, and a malformed array surfaces the parse error instead of a blank box.
Common pitfalls
Expecting numbers with type inference off. Off means every element stays a string, so you get ["1","2"] not [1,2]. Flip the toggle on first.
Assuming inference parses anything numeric-looking. It is strict: 0x10, version 1.2.3 and id 007-A stay strings. Only clean numbers, true, false and null convert.
Pasting a JSON object into the reverse direction. It accepts only a top-level array; {"a":1} returns a not-an-array error, so wrap your values in brackets first.
Privacy
The line split, type inference, dedupe, sort and JSON serialization all run as plain JavaScript in your browser tab. Your list never leaves the page and nothing is logged. Note the shareable URL puts your input in the query string, so for confidential ids or keys use the copy button instead of sharing the link.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- 555 Timer Calculator Astable f = 1.44/((R1+2R2)C) + monostable t = 1.1RC — pick R1, R2, C in Ω/kΩ and µF/nF, read frequency, duty cycle and pulse width — browser-only
- Add Line Numbers Number every line of pasted text — set start, step and separator, zero-pad to align, skip blanks, or strip numbers back off — browser-only
- AES Text Encryptor Encrypt & decrypt text with a password — AES-256-GCM + PBKDF2 via WebCrypto — 100% in your browser, nothing uploaded
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only