Skip to tool

JavaScript Split Online

Split by delimiter.

The output updates as you type. The tool processes input in your browser.

Worked example

Provide a literal separator. Preserve empty fields if adjacent separators represent missing values.

Delimiter
","
Limit (-1 for all)
-1
Sample input
a,b,c,d
Sample output
[
  "a",
  "b",
  "c",
  "d"
]

Using this operation in JavaScript

The interactive result uses JavaScript. JavaScript string indexes count UTF-16 code units. Use code-point iteration when working with supplementary Unicode characters.

JavaScript reference