gptcleanuppro.com / slash-to-json-array
Ready · local0w
Works with text copied from
ChatGPTClaudeGeminiGrokCopilotPerplexity
delimiter recognised
1
bytes sent to a server
0
length or run limit
None

The tool

A precise slash to JSON array converter

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

The conversion runs entirely in JavaScript in your browser. There is no request sent to a server, and no run limit, since nothing here costs anything to serve.

Where the format comes from

Where slash-separated text actually originates

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

Because the slash performs several unrelated jobs at once, path segment, date component, division symbol, the same character surfaces in a substantial amount of everyday text for reasons unrelated to delimiting a list.

How it works

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

No configuration, no path format to declare in advance.

Step 1
Paste the slash-separated path, breadcrumb or date into the input field.
Step 2
Press Convert. The split and trim run instantly, client side.
Step 3
Copy the resulting JSON array from the output panel.

Why it matters

What a forward slash split produces from a full URL

Paste a URL such as 'https://example.com/a/b/c' and the split occurs at every forward slash, including the two immediately after the scheme. Since those two slashes sit adjacent with nothing between them, the resulting empty item is dropped automatically, and 'https:' returns as its own item, with the colon still attached, since the colon is not part of the delimiter.

The output reads 'https:', 'example.com', 'a', 'b', 'c', which is typically the intended result when breaking a URL into path segments, worth anticipating rather than discovering by surprise.

A percent-encoded slash, written as '%2F' to represent a literal slash character inside one path segment, is left untouched by this converter, since '%2F' is three ordinary characters rather than the forward-slash byte itself. A segment deliberately encoded to protect an internal slash survives as one item exactly as intended.

A common mix-up

Why this leaves a Windows-style path untouched

This tool splits specifically on the forward slash, '/'. Windows file paths traditionally use the backslash, '\', as their separator instead, so a path such as 'C:\Users\name\Documents' produces no split whatsoever here, returning as a single item since it contains no forward slash at all.

For backslash-separated paths, the custom delimiter tool handles that case: 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 locale?

It reliably separates a slash-formatted date into its three numeric components, but has no way to determine whether those components represent day, month, year or month, day, year, since that depends entirely on the locale the date was originally written in, information a plain character split cannot recover.

Use the resulting array with that limitation in mind: the three numbers are correctly separated from one another, but identifying which is the day and which the month remains a determination for the person converting the data.

Who it's for

Who uses a slash to JSON array converter, and when

Developers use it to break a URL path or a file path into 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 from a slash-formatted date string uses it to separate the numeric pieces before reformatting them into whatever order a target system actually expects.

FAQ

Slash to JSON array, answered precisely

All answered in full, nothing to click open.

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

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

Is it free?

Yes. No signup, no length cap, no run limit, since the conversion runs on your own device.

Is my text uploaded anywhere?

No, the split runs entirely client side. Nothing is transmitted, stored or logged.

Does it split on forward slashes or backslashes?

Forward slashes only, '/'. A path using backslashes, such as a Windows path, will not split with this converter.

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?

The split occurs 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 separates the three numbers. Which represents the day versus the month depends on locale, information this converter has no way to determine.

What happens to whitespace around each value?

It's trimmed automatically, removing any stray spacing around a segment.

What happens with two consecutive slashes?

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

Is there a length limit on the input?

No. There's no cap and no run limit, only your device's own memory.

Does it work on phones?

Yes, the layout adapts to narrow screens.

What's the difference between this and the custom delimiter tool?

This converter 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 an API or batch mode?

Not currently. This is a single-paste, browser-based converter.

Will it split a fraction such as 3/4?

Yes, it splits at that slash too, having no way to distinguish a fraction from a delimiter. Treat standalone fractions with that caveat in mind.

Is the output guaranteed to be valid JSON?

Yes, it's built with JSON.stringify. It cannot confirm the split points matched your intent, only that the result parses.

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 retains 'https:' or 'http:' as its own item, colon included, since the colon is not part of the delimiter.

Is confidential data safe to paste here?

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

Why did my date come out as three unlabeled numbers?

That's expected behaviour. This converter only separates the values, it does not determine or label which number is the day, month or year.

Does %2F inside a segment get treated as a real slash?

No. '%2F' is a percent-encoded representation, three separate characters, not the actual forward-slash byte, so this converter leaves it inside its segment untouched.

What happens with a trailing slash at the end of a path?

It produces one empty trailing item, which is dropped automatically, so '/users/123/' converts the same as '/users/123'.

Convert a slash-separated path to JSON.

Computed locally, no upload, no run limit.

Open the converter