gptcleanuppro.com / double-space-to-json-array
Ready · local0w
Works with text copied from
ChatGPTClaudeGeminiGrokCopilotPerplexity
spaces required to split
2 or more
bytes sent to a server
0
length or run limit
None

The product

A double space to JSON array converter with one rule

This double space to JSON array converter applies a single delimiter: a run of two or more consecutive space characters. Everything else about the behaviour follows from that, and all of it is worth stating precisely, because the value of a delimiter tool is entirely in knowing what it will and will not cut.

The choice of two-or-more rather than exactly-two is what makes the route useful on column-aligned text. Alignment produced by padding is uneven by nature: one column is separated by two spaces, the next by nine. A rule keyed to an exact count would split inconsistently across the same line. A rule keyed to a run splits every gap and no single space.

The conversion is computed in the browser. No text is transmitted, there is no rate limit, no character ceiling and no account.

The output contract

Exactly what the converter emits

Five properties define the result. Each is observable and each is a deliberate limit rather than an oversight.

Split
Every run of two or more space characters becomes a boundary. A single space never does.
Trim
Each resulting segment has leading and trailing whitespace removed before it is emitted.
Discard empties
Segments that trim to an empty string are removed, so a deliberate empty entry is not representable.
String typing only
Every value is emitted as a quoted string. Numeric and boolean inference is not performed.
Standard serialisation
The array is serialised with proper escaping and printed with a two-space indent, one element per line.

Procedure

How to convert column-aligned text to JSON in three steps

There are no options to set, so the procedure is fixed.

Step 1
Paste the column-aligned source into the input.
Step 2
Convert. The split, trim and serialisation run locally and return immediately.
Step 3
Verify the element count against the expected column count before using the output.

A worked example

One aligned row, traced through the converter

Consider a row reading apples, a gap of two spaces, Los Angeles, a gap of nine spaces, then 40. Three columns, two gaps of different widths, and one internal single space.

The rule fires on both gaps because both are runs of two or more, and it does not fire on the space inside Los Angeles. Trimming removes the padding that was swept into each segment. Nothing trims to empty, so nothing is discarded. Serialisation quotes all three values, including 40, and prints them one per line under a two-space indent. Three elements out, in source order, with the phrase intact.

Why it returns one element

The failure mode is almost always the wrong whitespace

Visual alignment says nothing about the codepoints producing it. Tab characters, no-break spaces and narrow no-break spaces all render as horizontal gaps and none of them satisfies a rule written against the ordinary space. A tabbed table therefore converts to exactly one element, which is the correct behaviour for the rule and a surprise for the user.

Diagnosis is straightforward: if the element count is one, the gap is not made of spaces. Terminal output and spreadsheet exports skew heavily towards tabs. Text extracted from a PDF skews heavily towards padded spaces, which is why PDF extraction is the strongest use case for this particular route.

An asymmetry worth knowing

Line breaks pass through as content, not as delimiters

The delimiter for this route is defined over space characters only. A newline is therefore not a boundary: it survives inside whichever segment contains it, and appears in the serialised output as an escape sequence rather than as a break between elements.

The practical consequence for a multi-row table is that row structure is lost while the newlines themselves are preserved inside values. Convert row by row if the rows are meaningful. If the data is one item per line to begin with, a line-break split is the correct operation and this is not the route for it.

Scope

What this converter deliberately does not do

Competing text-to-JSON pages bundle several transformations behind one interface. This route implements one, and the omissions are worth naming.

No object output
Key and value parsing into a JSON object is not implemented. The result is always a flat array.
No nesting
There is no grouping into sub-arrays and no row-to-record mapping.
No header row handling
CSV-style conversion with the first row as keys is a different operation and is not performed here.
No deduplication
Repeated values are all retained. Removing duplicates is a separate transformation.
No file handling
Input arrives by paste and output leaves by copy. There is no upload and no download.
No configurable delimiter
This slug's delimiter is fixed in code. Only the custom delimiter route renders a delimiter field.

In practice

Who uses a double space to JSON array converter, and when

The recurring situation is data that was formatted for reading and now has to be parsed.

PDF and document extraction
Extracted text pads columns with spaces far more often than it uses tabs, which matches this rule directly.
Terminal captures
Padded command output, headed for a fixture or a configuration file.
Specification to enumeration
A column of permitted values in a written spec, becoming a union type or a validation list.
Ad hoc shaping
A short list already on screen that needs to be valid JSON without opening an editor.
FAQ

Double space to JSON array, in detail

All answered in full, nothing to click open.

What is the exact split rule?

A run of two or more consecutive space characters. A single space is never a boundary.

Does the gap have to be exactly two spaces?

No. Any longer run splits identically, which is what makes uneven column padding work.

Are multi-word values preserved?

Yes. Internal single spaces are untouched, so a two-word value stays one element.

Is the converter free?

Yes, with no account, no rate limit and no character ceiling.

Is any text transmitted?

No. The computation is local to the browser and nothing is sent to a server.

Are tab characters treated as delimiters?

No. The rule is defined over space characters. Tabs require the tab route.

Are newlines treated as delimiters?

No. A newline is preserved inside its element and serialised as an escape sequence.

Are numeric values emitted unquoted?

No. Every element is a quoted string. No type inference is performed.

Can the output be an object rather than an array?

No. The output shape is a flat array of strings and cannot be configured.

How is the JSON formatted?

Pretty-printed with a two-space indent and one element per line.

What happens to segments that are empty?

They are discarded, so an intentional empty string cannot appear in the result.

Is escaping handled correctly?

Yes. Quotes, backslashes and control characters are escaped by the serialiser, so the output always parses.

Are duplicates removed?

No. Deduplication is a separate operation and is not applied on this route.

Why did the conversion return one element?

The gaps are not ordinary spaces. Tabs, no-break spaces and narrow no-break spaces are the usual causes.

Can I supply a file?

No. The surface accepts pasted text and returns text for copying.

What is the maximum input size?

There is no imposed limit. The practical bound is the browser and device running the page.

Can I change the delimiter here?

No. It is fixed for this slug. The custom delimiter route is the only one that exposes an input for it.

How does this differ from the space route?

The space route splits on any whitespace run, including single spaces, and will break multi-word values apart.

Does element order change?

No. Elements appear in source order.

Does it work on mobile?

Yes, in any modern mobile browser, with the same local computation.

Is there an API or batch mode?

Neither. Conversion happens one input at a time in the page.

One delimiter, stated exactly.

Runs of two or more spaces, trimmed, serialised locally, with nothing transmitted.

Open the converter