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.