Free pipe to JSON array converter

Pipe-delimited log lines and table rows, into JSON.

Free pipe to JSON array converter. Paste a pipe-delimited log line or table row and get a trimmed, indented JSON array back in your browser.

Paste your text to begin
0 chars / 0 words
bytes uploaded
0
length or run limit
None
indent, always
2-space

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.

FAQ

Pipe to JSON array FAQ

Everything below is answered in full, nothing to click open.

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

Paste the line into the box above and press Convert. Each pipe-separated value becomes one item in the array.

Is the pipe to JSON array converter free?

Yes. No signup, no paste length limit and no cap on how many times you use it.

Is my text uploaded anywhere?

No. The split runs on your own device and nothing is transmitted or stored.

Why did my empty field vanish from the array?

Empty items are removed before the array is built, so two pipes with nothing between them produce no item. Every field after the gap moves up one position.

Can I keep empty fields as blank items?

No. This route has no options, so dropping empty items is fixed behaviour and cannot be switched off.

Does it turn numbers into JSON numbers?

No. Every value comes back as a string, so a code like 00292 keeps its leading zero instead of becoming 292.

Can it produce 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 handle a Markdown table row correctly?

Usually yes. The border pipes at each end leave empty items, which are dropped, so you are left with the cell values.

What about a pipe escaped with a backslash inside a Markdown cell?

It is still treated as a delimiter, so the cell splits anyway and the backslash is left on the end of the previous item.

What happens to the spaces around each value?

They are trimmed off automatically, so a line padded for readability still produces clean items.

Can I turn trimming off?

No. Trimming is always on, because this route renders no options.

Does it process several lines at once?

It splits the whole paste on every pipe it finds, so several lines produce one combined array rather than one array per line.

Why does one of my items contain a line break?

A line break is not a delimiter here, so it stays inside whichever item spans the end of one row and the start of the next.

Can I get minified JSON instead of indented JSON?

No. The output is always indented with two spaces and there is no formatting switch.

Can I upload a file or download the result?

No. This is a paste-in, copy-out tool, with no file input and no download button.

Is there a batch mode or an API?

Not yet. Paste, convert, copy is the fastest route for now.

What if a value legitimately contains a pipe?

It will be split at that pipe, because the split has no quoting rules. Data with pipes inside values needs a parser, not a delimiter split.

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

This splits on the pipe character, which logs and Markdown tables use. The comma tool splits on commas, which suits CSV-style lists.

Why do log formats use a pipe rather than a comma?

A pipe is far less likely to appear inside a real field value than a comma is, so the split holds up more reliably on real data.

Does it work on phones?

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

Does it work on a large paste?

Yes. Nothing in the tool imposes a length cap or a run limit, because there is no server call to ration.

Is the JSON it produces always valid?

The output is always syntactically valid JSON. It cannot tell you whether the split landed where you meant it to.

Turn a pipe-delimited line into JSON.

Paste, convert, copy. Nothing leaves your browser, and there is no limit on how often you use it.

Convert my line