Split Text

Split a string on a delimiter and place each fragment on its own line.

What Split Text helps you do

Split a single string into fragments on a delimiter and place each on its own line. It is the quick way to turn a comma-separated list, a path or a paragraph into an item-per-line format that other tools and spreadsheets expect. Splitting is literal, so it does not understand CSV quoting.

Text is split locally in your browser and is not uploaded to Haivix.

How it works

Line tools split the pasted text into lines, apply one operation to the list, and rejoin it with a newline. A blank line is still a line, so it participates in sorting, numbering and shuffling unless you remove it first. The transformation runs in the browser and keeps the existing line order except where the tool's purpose is to change it. Nothing is uploaded, and the output replaces the preview rather than the source. If the input ends with a newline, the final empty line can affect a count or a shuffle; trim the input first when that matters.

How to use Split Text

  1. Paste the string and enter the delimiter, such as a comma or space.
  2. Optionally set a maximum number of parts.
  3. Split the text to see one fragment per line.
  4. Copy the list for the next step.

When to use it

  • Turn a comma-separated tag list into one tag per line.
  • Break a paragraph into sentences on period characters.
  • Explode a URL path into its segments for review.
  • Split a list of values before deduplicating it.
  • Turn a space-separated string into rows.
  • Separate a combined field into its parts.

When not to use it

  • Do not use it on CSV with quoted delimiters; those commas still split.
  • Do not use it when the delimiter also appears inside the values.
  • Do not expect it to trim the resulting fragments.

Example

Splitting apple,banana,cherry on a comma gives three lines: apple, banana and cherry. With a limit of two, the first line is apple and the second keeps the rest, banana,cherry. An empty delimiter splits the string into individual characters.

What you can do with Split Text

  • Split on a chosen delimiter, such as a comma or space.
  • Leave the delimiter empty to split into characters.
  • Cap the number of parts with a limit.
  • Put each fragment on its own line.
  • Keep the original fragment order.
  • Copy the resulting list.

Example: check the line structure first

Paste a small sample and note how many lines it has, including blank lines and a possible trailing newline. The count explains most surprises after sorting, numbering or filtering.

Apply the operation and compare the first and last lines with the source. If the structure is right, run the full text; if not, remove the blank lines or trim the input first.

Copy or download the result and keep the original until the destination accepts it. Line tools are one-way, so the source is the only undo.

For a list pasted from a spreadsheet, check for hidden carriage returns or wrapping quotes before transforming it. A stray quote can sort differently or survive a filter that looks correct at a glance.

When the result feeds another tool, run a second pass only after confirming the first. Chaining a sort and a deduplication is safe, but chaining two numbering steps produces duplicated prefixes.

If the output is going into a version-controlled file, check the diff before committing. A blank-line or line-ending change can look like a content change in review even when the words are unchanged.

What to know before you start

  • Splitting is literal and does not understand CSV quoting, so a comma inside quotes still splits.
  • An empty delimiter is handled carefully but a delimiter not present simply returns the original line.
  • Fragments are not trimmed or escaped.
  • There is no multi-character delimiter escaping.

Common mistakes

  • Splitting a CSV with quoted commas and getting extra fragments.
  • Forgetting to set a limit on a very long string.
  • Using a space delimiter on prose and getting one word per line.
  • Assuming fragments are trimmed; they keep their surrounding spaces.

Troubleshooting

If there are more fragments than expected, the delimiter appears inside the values.

If the result is one line, the delimiter was not found.

If fragments have leading spaces, trim them afterward.

If the last fragment contains everything, the limit grouping kept the remainder together.

Related standards and documentation

  • A newline is a single line separator in Unix text; Windows files may use CRLF.
  • Modern JavaScript sorts are stable, so equal lines keep their relative order.
  • Blank lines are entries, not separators, in these transformations.
  • A trailing newline is a text convention, not content; remove it before counting lines.
Blank lines are still lines
  • Count the lines before you transform.
  • Remove blanks first when they should not participate.
  • Keep the original until the result is accepted.
  • Check the last line for a trailing newline.

Frequently Asked Questions