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

Slash to JSON array

What the slash to JSON array converter does

Paste text separated by forward slashes, a file path, a URL path, a breadcrumb trail, a date, and this app splits it on every forward slash, trims each value, and returns a formatted JSON array.

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 slash-separated text actually comes from

The forward slash is the path separator on the web and Unix-family systems, so URLs, file paths and category breadcrumbs like 'Electronics/Computers/Laptops' all use it as the natural boundary between segments. It's also a common date separator in some locales, day, month and year, or month, day and year, joined by slashes.

Because the slash carries so many unrelated jobs, path segment, date component, division symbol, the same character shows up in a lot of everyday text for reasons that have nothing to do with delimiting a list.

Workflow

How to convert slash-separated text to JSON in three steps

Nothing to configure, no path format to declare first.

Step 1
Paste your slash-separated path, breadcrumb or date 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 a forward slash split does with a full URL

Paste a URL like 'https://example.com/a/b/c' and the split happens at every forward slash, including the two right after the scheme. Since those two slashes sit together with nothing between them, that empty item gets dropped automatically, and 'https:' comes back as its own item, colon still attached, since the colon isn't the delimiter here.

The result reads 'https:', 'example.com', 'a', 'b', 'c', which is usually exactly what you want for breaking a URL into path segments, just worth knowing ahead of time rather than getting surprised by it.

A common mix-up

Why this does nothing to a Windows-style path

This app splits on the forward slash, '/', specifically. Windows file paths traditionally use the backslash, '\', instead, so pasting a path like 'C:\Users\name\Documents' here produces no split at all, the whole string comes back as a single item since there's not one forward slash in it.

For backslash-separated paths, the custom delimiter tool handles that: enter a single backslash as the delimiter and it splits the same way this app splits on a forward slash.

Straight answer

Does this parse dates correctly regardless of format?

It splits a slash-separated date into its three numeric parts reliably, but has no idea whether those mean day, month, year or month, day, year, since that depends entirely on the locale the date was written in, information a plain split can't recover.

Use the result with that ambiguity in mind: the three numbers are correctly separated, but which one is the day and which the month is on you to work out from context.

Who it's for

Who uses a slash to JSON array converter, and when

Developers use it to break a URL path or file path into individual segments for routing logic, logging or a quick script, without writing a dedicated parser for a one-off task. Content and taxonomy teams use it to turn a breadcrumb-style category string into an array of category levels for structured data.

Anyone extracting the day, month and year from a slash-formatted date string pastes it here to get the pieces apart before reformatting them into whatever order a target system expects. It also comes up when tidying up a long list of file paths pulled from a server directory listing, one path at a time.

FAQ

Everything answered. Nothing to click open.

How do I convert a slash-separated path to a JSON array?

Paste it above and press Convert. Each segment between forward slashes 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.

Does it split on forward slashes or backslashes?

Forward slashes only, '/'. A path using backslashes, like a Windows path, won't split with this tool.

How do I convert a Windows path with backslashes?

Use the custom delimiter tool and enter a single backslash as the delimiter.

What happens when I paste a full URL?

It splits at every forward slash, and the empty item between the two slashes after the scheme is dropped automatically, so 'https://example.com/a' becomes 'https:', 'example.com', 'a'.

Does it know whether a date is day/month/year or month/day/year?

No, it only splits the three numbers apart. Which one is the day versus the month depends on locale, which this app has no way to know.

What happens to spaces around each value?

They're trimmed automatically, so any stray spacing around a segment is removed.

What happens with two slashes in a row?

The empty item between them is dropped, which is what makes a URL's double slash after the scheme convert cleanly.

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 custom delimiter tool?

This is fixed to a forward slash. The custom delimiter tool accepts any separator, including a backslash for Windows paths.

Can I convert a breadcrumb-style category string?

Yes, 'Electronics/Computers/Laptops' converts cleanly into an array of the three category levels.

Is there a batch mode or an API?

Not yet, paste, convert, copy for now.

Will it split a fraction like 3/4?

Yes, it splits at that slash too, having no way to tell a fraction from a delimiter. Treat standalone fractions with caution.

Does it validate the resulting JSON?

The output is always syntactically valid JSON. It can't tell you whether the split matched your intent.

Can I use this to break apart an API route path?

Yes, '/users/123/orders' converts into its path segments, with the leading empty item before the first slash dropped automatically.

Does it strip the protocol from a URL?

No, it keeps 'https:' or 'http:' as its own item, colon included, since the colon isn't part of the delimiter.

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

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

Why did my date come out as three unlabeled numbers?

That's expected. This app only separates the values, it doesn't know or label which number is the day, month or year.

Can I convert a hierarchical file path from a server directory listing?

Yes, a full path like '/var/www/site/index.html' splits into its individual folder and file names the same way any other forward-slash-separated text does.

Does the leading slash on an absolute path create an extra empty item?

No, a leading slash produces an empty string at the very start of the split, and that empty item is dropped automatically along with any others.