Ready, runs in your browser
0 chars · 0 words
bytes leaving your device
0
steps, paste to copy
3
signup or run limit
None

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.

FAQ

Everything answered. Pipe to JSON array questions

How do I convert a pipe-delimited line to a JSON array?

Paste the line, press Convert, press Copy. Each pipe-separated value becomes one item in the array.

Is the pipe to JSON array converter free?

Yes. There is no signup, no length cap and no limit on how many conversions you run.

Is anything I paste uploaded?

No. The conversion runs on your own device, so nothing is transmitted or stored.

Why does my array have fewer items than my line had fields?

Empty fields are dropped, so two pipes with nothing between them produce no item and every later field shifts up a position.

Can I keep the empty fields so positions stay stable?

No. This route renders no options, so removing empty items is fixed behaviour.

How should I check the output before using it?

Compare the number of items in the array against the number of fields your format defines, especially when any field can be blank.

Are numbers converted to JSON numbers?

No. Every value stays a string, which is why a padded reference like 00292 keeps its leading zero.

Can I get an array of objects with named keys?

No. The output is always a flat array of strings, with no header detection and no key naming.

Does it work on a Markdown table row?

Yes. The border pipes at each end produce empty items that get dropped, leaving the cell values behind.

What about a pipe escaped with a backslash in a cell?

The cell splits at it anyway and the backslash is left on the end of the previous item, so that row needs fixing by hand.

Does it strip the padding around values?

Yes. Each value is trimmed, so an aligned, human-readable line still gives clean items.

Can I paste a whole block of rows?

You can, but you get one combined array rather than one per row, with line breaks left inside the items that span row boundaries.

Is there a batch mode or an API?

No. For more than a handful of rows a script is the right tool, not this one.

Can I upload a file or download the JSON?

No. There is no file input and no download button, only paste in and copy out.

Can I get the JSON minified?

No. Output is always indented with two spaces and there is no formatting option.

What if one of my values contains a pipe on purpose?

It will be split there. The converter has no quoting rules, so that data needs a real parser.

What is the difference between this and the comma to JSON array tool?

Only the delimiter. This one splits on pipes, which suits logs and Markdown tables, while the comma tool suits CSV-style lists.

Why is the pipe used as a delimiter so often?

Because real field values rarely contain one, unlike commas and spaces, so the split survives contact with messy data.

Does it work on a phone?

Yes. The layout stacks on narrow screens and the conversion still runs locally.

Is there a limit on how much I can paste?

No. Nothing in the tool caps length or counts runs, because there is no server call involved.

Will the JSON always be valid?

Yes, it is always syntactically valid. Whether the split landed where you intended is something only you can check.