The job
What the pipe to JSON array converter does
You have one pipe-delimited line and you need its fields as JSON, now, without opening an editor or writing a throwaway script. Paste it, press the button, copy the array. The converter splits on every pipe, trims each piece, discards anything that came out empty, and prints the rest indented with two spaces.
The whole thing happens on your device. No file goes anywhere, there is no account step in the way, and nothing counts your runs, so you can work through twenty lines in a debugging session without hitting anything.
Workflow
How to convert pipe-delimited text to a JSON array in three steps
There is nothing to set up first. This route renders no options, so the pipe is the delimiter and that decision is already made for you.
- Step 1
- Paste the line. The meter above the box counts characters and words as you go, so you can tell a truncated paste from a complete one.
- Step 2
- Press Convert. The split, the trim and the removal of empty items all run locally.
- Step 3
- Press Copy, then check the item count in the output against the field count you expected before you use it.
Check this first
Check the item count before you index the array
The one behaviour that will catch you out in a workflow is that empty fields do not survive. Two pipes with nothing between them produce an empty string, empty strings are removed, and every field after that gap moves up a position.
So a record with an optional middle field gives you a different number of items depending on whether that field was filled in. If your next step reads item four expecting a status code, a single blank field upstream silently hands it the wrong value.
- Count the items
- Compare the length of the array against the number of fields the format defines.
- Watch optional fields
- Any field that can be blank makes the positions after it unreliable across lines.
- Do not look for a setting
- There is no option to keep empty items. The behaviour is fixed on this route.
What you get back
What the converter does to each value
Three things happen to every piece between two pipes, and knowing which is which saves a confusing five minutes later.
- It is trimmed
- Padding put in for readability is stripped from both ends, so aligned columns come out clean.
- It stays text
- Nothing is converted to a JSON number or boolean. A reference like 00292 keeps its leading zero rather than collapsing to 292.
- It is dropped if empty
- Anything that trims down to nothing is removed rather than kept as a blank item.
Markdown
Using the pipe to JSON array converter on a table row
Moving a row of settings out of documentation and into a config object is the most common non-log use of this tool, and it works better than it has any right to. A Markdown row has a pipe at each end as well as between the cells, those border pipes leave empty items, the empty items are dropped, and you are left holding the cell values.
The one row shape that fails is a cell containing an escaped pipe, written with a backslash in front of it so the pipe shows in the rendered table. The converter has no Markdown knowledge, splits at that pipe like any other, and leaves the backslash hanging on the end of the item before it. If you spot an item ending in a backslash, fix that cell by hand rather than trusting the array.
Scaling it up
Converting more than one row at a time
Pasting a block of rows does not give you an array per row. The converter looks for pipes and nothing else, so the whole paste becomes one flat array, and the line breaks are still in there, sitting inside whichever item spans the end of one row and the start of the next.
For a handful of rows, the practical workflow is one line at a time, converting and copying each before moving to the next. For anything bigger than that you want a script, not this tool, and there is no batch mode, no file upload and no API here to change that.
Straight answer
Does the pipe to JSON array converter map fields to keys?
No. You get a flat array of strings and never an array of objects. There is no header row detection and no place to name keys, so if your pipeline needs named fields, this tool hands you the values and you do the naming in the next step.
It also has no quoting rules. A value wrapped in quotes that contains a pipe is split at that pipe like anything else. Data with pipes inside values cannot be handled by any delimiter split, including this one, and needs a parser that understands the quoting.
Where it fits
Who reaches for a pipe to JSON array converter
Engineers mid-incident, holding one log line out of a pipe-delimited application or audit log, who need the fields laid out and named in their head before they can reason about them. The format is still everywhere in systems built before structured logging, because the pipe was chosen for being the character a timestamp, a username or a status code would never contain.
Also anyone handling a one-row export from an older accounting or inventory system, and anyone lifting a row out of a Markdown table into a config file. In all three cases the alternative is writing a parser for something you will do once, which is exactly the work this removes.