Free colon to JSON array converter

Positional records and key value pairs, into JSON.

Free colon to JSON array converter. Paste a colon-separated record, like a passwd-style row or a key value pair, and get a clean JSON array back.

Paste your text to begin
0 chars / 0 words
bytes uploaded
0
usage limit
None
always
Free

Colon to JSON array

What the colon to JSON array converter does

Paste a line where fields are separated by colons and this tool splits it on every colon, trims each value, and returns a formatted JSON array. It is aimed at fixed-position records, the kind of line where a colon marks a field boundary rather than punctuation.

It runs in your browser. Nothing you paste is uploaded, there is no signup, and there is no limit on how many lines you convert.

Where the format comes from

Where colon-separated records actually come from

The classic example is a Unix-style '/etc/passwd' line: 'root:x:0:0:root:/root:/bin/bash', seven colons marking seven field boundaries in a fixed, positional record. Plenty of other system configuration files and legacy export formats use the same pattern, a colon between each field in a known, fixed order.

The colon also shows up informally as a 'key: value' shorthand, in notes, config snippets and simple settings files, where a label and its value sit on either side of a single colon.

How it works

How to convert a colon-separated record to a JSON array in three steps

Nothing to configure, no field count to specify up front.

Step 1
Paste your colon-separated line into the input box.
Step 2
Press Convert. The split and trim happen instantly, locally.
Step 3
Copy the resulting JSON array from the output box.

Why it matters

What breaks when a colon shows up for reasons other than a field boundary

A colon is not exclusive to delimited records. A timestamp like '14:30:00' uses colons to separate hours, minutes and seconds. A URL like 'https://example.com:8080/path' uses one colon after the scheme and another before a port number. An aspect ratio like '16:9' uses one too.

Paste a line that contains one of these incidentally, alongside genuinely delimited fields, and the colon inside the timestamp or the URL gets treated exactly the same as the colons that are actually meant to separate fields, which shatters that value into pieces it was never meant to be split into.

The underlying issue

Why colon-delimited data needs a clean, single-purpose line

Positional record formats like a passwd file work because every field in that particular file format is defined never to contain a colon of its own, the format's designers made that guarantee up front. A field that stores a URL, a time or a ratio breaks that guarantee the moment it appears in a colon-delimited row, because the tool reading it has no way to know which colons are structural and which are just part of the data.

This is the same underlying tension every delimiter in this family deals with: a delimiter only works cleanly when the data itself is guaranteed not to contain it.

Straight answer

Will this correctly split a line with a URL or a timestamp in it?

Not reliably, no. If a URL or a timestamp is one of the fields alongside colon-delimited data, its own internal colons will be split apart along with the field boundaries, since this tool cannot distinguish a structural colon from an incidental one.

For a clean positional record like a passwd-style line, where colons only ever mean a field boundary, it works exactly as expected. Check your source data for any field that might itself contain a colon before trusting the split.

Who uses it

Who uses a colon to JSON array converter, and when

System administrators use it to turn a line from '/etc/passwd', '/etc/group' or a similar colon-delimited config file into a JSON array while scripting or documenting a server setup. Developers use it to parse a simple 'key: value' style line pulled from a settings file or a note into a structured pair.

Anyone working with a legacy export or a fixed-format log that uses colons as its field separator, and that is careful about the timestamp and URL caveat, uses it to get one line into JSON quickly rather than writing a parser for a single lookup.

FAQ

Colon to JSON array FAQ

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

How do I convert a colon-separated line to a JSON array?

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

Is the colon to JSON array converter free?

Yes. No signup, no paste limit, no usage limit, it runs entirely in your browser.

Is my text uploaded anywhere?

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

Will it split a timestamp like '14:30:00' apart?

Yes, every colon is treated as a boundary, so a timestamp mixed into a colon-delimited line will be broken into separate pieces along with the actual fields.

Will it split a URL apart at its colons?

Yes, both the colon after the scheme and any colon before a port number are treated as delimiters, which breaks a URL into fragments.

Can I convert an '/etc/passwd' style line with this?

Yes, that is exactly the format this tool is built for, since every colon in that line genuinely marks a field boundary.

What happens to spaces around each value?

They are trimmed automatically, so 'root : x : 0' comes back as clean, trimmed items.

What happens with two colons in a row?

The empty item between them is dropped, so an empty field in a positional record does not produce a blank array entry in its place.

Does it work on large pastes?

Yes, there is no length cap and no run limit.

Does it work on phones?

Yes, the layout stacks on narrow screens.

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

This splits on colons, common in positional records and key-value shorthand. The semicolon tool splits on semicolons, common in European CSV exports.

Can I use it to split a simple key: value line?

Yes, a line like 'name: value' converts into a two-item array with the key first and the value second.

Will an empty field in the middle of a record disappear?

The dropped empty item does mean the array will have fewer entries than the record had fields, if any field was genuinely blank between two colons.

Is there a batch mode or an API?

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

Why did one of my fields get cut in half?

That field likely contained its own colon, a time, a URL or a ratio, which this tool cannot distinguish from a field boundary.

Does it validate the resulting JSON?

The output is always syntactically valid JSON, built with JSON.stringify. It cannot tell you whether the split points matched your data's actual structure.

Can I use this for Windows environment variable paths?

No, Windows separates PATH entries with a semicolon, not a colon. Unix systems use a colon for that purpose instead.

Does this handle IPv6 addresses, which use colons?

No, an IPv6 address like '2001:db8::1' will be shattered at every colon, since this tool has no awareness of address formats.

Is my data safe to paste if it's confidential?

Yes, nothing is transmitted anywhere. Processing happens locally in your browser.

How do I check whether my line is safe to split on colons?

Scan it for anything that isn't a genuine field boundary: a time, a URL, a ratio or an address. If none of those appear, a colon split is safe.

Turn a colon-separated line into JSON.

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

Convert my line