Free slash to JSON array converter

Paths and dates, split into a JSON array.

Free slash to JSON array converter. Paste a slash-separated path, breadcrumb or date and get a clean JSON array back, right in your browser.

Paste your text to begin
0 chars / 0 words
bytes uploaded
0
usage limit
None
always
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 tool splits it on every forward slash, trims each value, and returns a formatted JSON array.

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

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

Because the slash carries so many unrelated jobs at once, 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.

How it works

How to convert slash-separated text to a JSON array 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 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 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 the two slashes there sit next to each other with nothing between them, the empty item that produces is dropped automatically, and 'https:' comes back as its own item, colon still attached, because the colon is not the delimiter here.

The result is an array like 'https:', 'example.com', 'a', 'b', 'c', which is usually exactly what you want when breaking a URL into path segments, just worth knowing in advance rather than being surprised by it.

A common mix-up

Why this does nothing to a Windows-style path

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

If you are working with backslash-separated paths, the custom delimiter tool handles that: enter a single backslash as the delimiter and it splits the same way this tool 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 components reliably, but it has no idea whether those components mean day, month, year or month, day, year, since that depends entirely on the locale the date was written in, information a plain split cannot recover.

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

Who uses it

Who uses a slash to JSON array converter, and when

Developers use it to break a URL path or a file path into its individual segments for routing logic, logging or a quick script, without writing a dedicated path 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 a structured data field.

Anyone extracting the day, month and year out of a slash-formatted date string pastes it here to get the three numeric pieces apart before reformatting them into whatever order a target system actually expects.

FAQ

Slash to JSON array FAQ

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

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

Paste it into the box above and press Convert. Each segment between forward slashes becomes one array item.

Is the slash 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.

Does it split on forward slashes or backslashes?

Forward slashes only, '/'. A path using backslashes, '\', like a Windows path, will not 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 represents the day and which the month depends on the locale, and this tool has no way to know that.

What happens to spaces around each value?

They are trimmed automatically, so any stray spaces around a segment are removed.

What happens with two slashes in a row?

The empty item between them is dropped, which is what makes converting a URL's double slash after the scheme come out clean.

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

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

Can I convert a breadcrumb-style category string?

Yes, a string like '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 is the fastest route for now.

Will it split a fraction like 3/4?

Yes, it will split at the slash there too, since it has no way to distinguish a fraction from a delimiter. Treat single standalone fractions with caution.

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 intent.

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

Yes, a route like '/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 array item, colon included, since the colon is not 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 separate numbers with no labels?

That is expected. This tool only separates the values; it does not know or label which number is the day, month or year.

Split a slash-separated path into JSON.

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

Convert my path