Pipe to JSON array
What the pipe to JSON array converter does
The pipe to JSON array converter splits whatever you paste on every pipe character, trims the whitespace off each piece, drops any piece that came out empty, and prints what is left as a JSON array indented with two spaces. That is the entire operation. There is no format to declare and no settings panel, because this route has no options on it at all.
It runs in your browser. Nothing you paste is uploaded, there is no account, and there is no cap on how long your text can be or how many times you convert. The output is always indented, never minified, and there is no switch to change that.
The one to watch
Why an empty field disappears from the array
Paste a record like 00292, an empty field, NETC1 and 4385529 separated by pipes, and four fields come back as three items. The gap between the two adjacent pipes produces an empty string, and empty strings are removed before the array is built. The field that was fourth in your line is now third in your JSON.
This matters if you read the output by position. A log format with optional fields will not produce the same number of items on every line, so item three is not reliably the same field from one record to the next. Count what comes back against what you expected before you index into it.
There is no toggle for this. Keeping empty fields as blank items is not something this converter can be asked to do.
How it works
How to convert pipe-delimited text to a JSON array in three steps
Nothing to configure. The pipe is the delimiter, it is the only one this route reads, and the counter above the box shows the characters and words in your paste as you type.
- Step 1
- Paste your pipe-delimited line, log entry or table row into the input box.
- Step 2
- Press Convert. The split, the trim and the drop of empty items all happen on your own device.
- Step 3
- Press Copy and paste the JSON array wherever you need it.
Types
Every value comes back as a JSON string
A reference like 00292 comes back as the string 00292, leading zero intact. Nothing here inspects a value and decides it is a number, a boolean or null. The split produces text and the text is written out as text.
For log data that is usually the behaviour you want. Account codes, invoice references, zero-padded IDs and long numeric identifiers all lose something the moment a parser treats them as numbers, and this converter never does. If you need real numeric types in the JSON, cast them afterwards in whatever is going to read the array.
Markdown
Pipe to JSON array on a Markdown table row
A Markdown row carries a pipe at each end as well as between the cells. Those border pipes leave an empty string on the outside of the row, and because empty items are dropped you get back exactly the cell values and nothing else. The tool does not know it is looking at Markdown, it just happens to come out right.
The escape is where that luck runs out. A cell written with a backslash in front of a pipe, so the cell can contain a literal pipe in its text, is split at that pipe anyway, and the backslash is left stranded on the end of the item before it. An item that ends in a backslash is the sign that this is what happened.
Multiple lines
What happens when you paste more than one line
The converter looks for pipes, not for lines. Paste two rows and you get one array rather than two, because a line break is not a delimiter on this route.
The line break does not disappear either. It ends up inside whichever item straddles the boundary, so two rows pasted together return one item in the middle that still contains the break between the end of the first row and the start of the second. Convert one line at a time when you want one array per line.
Straight answer
Does it build an array of objects with named keys?
No. The output is a flat array of strings, every time. There is no header row detection, no key naming and no object mode, so a header row pasted in here is split into ordinary string items exactly like any other line.
Quoting is not understood either. A field wrapped in quotes that happens to contain a pipe is split at that pipe like anything else, because the split has no idea the quotes are supposed to mean something. If pipes appear inside your values, no delimiter split will rescue the data and you need a real parser instead.
Who uses it
Who uses a pipe to JSON array converter, and when
Developers pulling the fields out of a single log line while debugging, without writing a parser for a lookup they will do once. Pipe-delimited application and audit logs are still common in systems built before structured logging, and the pipe was picked deliberately, because a timestamp, a username or a status code almost never contains one, while a comma or a space easily might.
People handling exports from older accounting, inventory and mainframe-adjacent systems, which still write pipe-delimited flat files a row at a time. And writers moving a row of specs or settings out of a Markdown table and into a config object.