Ready, runs in your browser
0 chars · 0 words
bytes leaving your device
0
steps to a finished array
2
no signup, no run limit
Free

Colon to JSON array

What the colon to JSON array converter does

Paste a line where fields are separated by colons and this app splits it on every colon, trims each value, and returns a formatted JSON array. It's aimed at fixed-position records, lines where a colon is a real field boundary, not punctuation.

It's local. The split runs in your browser, not on a server, so nothing you paste is uploaded and there's no limit on how many lines you convert.

Where the format comes from

Where colon-separated records actually come from

The classic case is a Unix '/etc/passwd' line: 'root:x:0:0:root:/root:/bin/bash', seven colons marking seven fields in a fixed, known order. Plenty of other config files and legacy export formats follow the same pattern, a colon between each field.

It 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 one colon.

Workflow

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

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

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

Why it matters

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

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

Paste a line with one of those mixed into genuinely delimited fields, and its colon gets treated the same as a structural one, shattering a value that was never meant to be split apart.

The underlying issue

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

A format like passwd works because every field is defined, by design, never to contain a colon of its own. A field that stores a URL, a time or a ratio breaks that guarantee the moment it shows up in a colon-delimited row, because there's no way to tell which colons are structural and which are just data.

It's the same tension every delimiter in this family runs into: a delimiter only works cleanly when the data is guaranteed not to contain it.

Straight answer

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

Not reliably. If a URL or a timestamp sits alongside colon-delimited data, its own internal colons get split apart with the field boundaries, since this app can't tell a structural colon from an incidental one.

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

Who it's for

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 config file into a JSON array while scripting or documenting a server setup. Developers use it to parse a simple 'key: value' line from a settings file into a structured pair.

Anyone working with a legacy export or fixed-format log that uses colons as its field separator, and who's checked for the timestamp and URL caveat, uses it to get one line into JSON without writing a parser. It also comes up in quick scripting tasks, turning one line pasted from a terminal session into something a small script can loop over immediately.

FAQ

Everything answered. Nothing to click open.

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

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

Is it free?

Yes, no signup, no paste limit, no run 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 a boundary, so a timestamp mixed into a colon-delimited line gets broken up along with the real fields.

Will it split a URL apart at its colons?

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

Can I convert a passwd-style line with this?

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

What happens to spaces around each value?

They're 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 doesn't produce a blank array entry.

Does it work on large pastes?

Yes, no length cap and no run limit.

Does it work on phones?

Yes, the layout stacks on narrow screens.

What's the difference between this and the semicolon converter?

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

Can I split a simple key: value line?

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

Will an empty field in the middle disappear?

Yes, the dropped empty item means the array can end up with fewer entries than the record had fields.

Is there a batch mode or an API?

Not yet, paste, convert, copy for now.

Why did one of my fields get cut in half?

It likely contained its own colon, a time, a URL or a ratio, which this app can't tell apart from a field boundary.

Does it validate the resulting JSON?

The output is always syntactically valid JSON. It can't tell you whether the split matched your data's real structure.

Can I use this for Windows PATH-style variables?

No, Windows separates PATH entries with a semicolon, not a colon. Unix uses a colon for that.

Does this handle IPv6 addresses?

No, an address like '2001:db8::1' will be shattered at every colon, since this app 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 appear, a colon split is safe.

Can I convert a Mac-style path that uses colons as separators?

Yes, older Mac OS paths used a colon between folder names, so a path written that way splits the same way any other colon-delimited line does.

Does this tool label which item in the array is which field?

No, the array is positional only, item order matches the order the fields appeared in, with no keys or labels attached to tell you what each one represents.