Theme: -
Font size:

Text Splitter - Split Text by Delimiter or Length

Split your text into separate lines by character delimiter, regular expression, or fixed chunk length.

Need to merge separate lines back into a single string? Use our Text Joiner.

🔒 Data Safety: We process everything securely and never store or share it.

Enter your text:

How to Use

  1. Enter the text to split, load a file with "Open File", or drop it into the box.
  2. Select a split mode, enter your delimiter, regular expression, or chunk size, and set piece filters.
  3. Check the live piece count, then copy or download the separated lines from the result box.

Options Explained

  • Split Mode: Select Character / Delimiter for exact strings, Regular Expression (RegEx) for patterns, or Chunk Length for fixed sizes.
  • Split By: Enter a character or string delimiter (including \t for tabs and \n for line breaks) in Delimiter mode. Enter a raw or /pattern/flags RegEx pattern, or a whole number of at least 1 for Chunk Length. Leave this field blank in Delimiter or RegEx mode to split your text into individual characters.
  • Trim Pieces: Removes leading and trailing spaces or tabs from each split piece before building the output lines.
  • Ignore Empty Pieces: Filters out blank pieces caused by consecutive delimiters or trimming so only non-empty lines remain in the result.

Key Features

  • Split text into separate lines by custom delimiter, regular expression, or fixed character chunk length.
  • Support escape sequences (\t for tabs, \n for line breaks) and blank delimiters for single-character splitting.
  • Accept both raw regular expressions and /pattern/flags syntax with automatic Unicode (u flag) support.
  • Keep emojis, accented letters, and multi-byte Unicode scripts intact without breaking combined characters in half.
  • Trim leading and trailing whitespace from split pieces or filter out empty pieces on demand.
  • Update total, non-empty, and empty piece counts in real time inside your local web browser.

About This Online Text Splitter

The text splitter is a browser-based utility that divides single-line or multiline strings into separate lines. It splits text by custom delimiters, regular expressions, or fixed character lengths with live piece counts and filtering.

Developed and maintained by the PU Tools team, this tool gives you fast, accurate, safe, and easy results in just a few clicks.

Common Use Cases

  • Delimited List Splitting: Convert comma-, pipe-, or tab-separated strings into one item per line for spreadsheets or database imports.
  • Fixed-Width String Chunking: Break long serial codes, hex strings, or character sequences into equal-length segments without breaking Unicode emojis.
  • Multi-Delimiter Text Splitting: Use regular expressions to split logs or unstructured text across multiple punctuation marks and spaces at once.

Example Input and Output

Example Input

Apple - Banana - Cherry 🚀 - Dragonfruit - Elderberry

Options used: Split Mode: Character / Delimiter | Split By: " - " | Trim Pieces: OFF | Ignore Empty Pieces: OFF

Example Output

Apple
Banana
Cherry 🚀
Dragonfruit
Elderberry

The splitter divides the hyphen-separated string into five separate lines while keeping the emoji intact.

Text Splitter Example
Screenshot: Actual output of the Text Splitter

Frequently Asked Questions

How do I split text into individual characters?

Select Character / Delimiter or Regular Expression (RegEx) mode and leave the Split By box empty. The splitter places each visible character or emoji on a separate line in the result box.

How can I split text by tabs or line breaks in Delimiter mode?

Type \t to split by tab characters or \n to split by line breaks in Split By. You can also enter \\ to split your text at literal backslash characters in your string.

What regular expression formats does RegEx mode support?

You can enter a raw pattern like \s+ or a slash-wrapped expression with flags like /[,;|]/g. The engine automatically applies the Unicode (u) flag so character classes match multi-byte characters accurately.

Does Chunk Length mode break emojis or accented letters in half?

No, Chunk Length mode counts complete visible Unicode characters instead of splitting multi-byte character codes. Multi-byte emojis, combined accents, and non-Latin characters stay intact inside their assigned fixed-length text chunks.

What is the difference between Trim Pieces and Ignore Empty Pieces?

Trim Pieces strips leading and trailing spaces or tabs from each piece after splitting your text. Ignore Empty Pieces removes blank lines created by consecutive delimiters or pieces that become empty after trimming.

Does this text splitter save or transmit my strings to any server?

No, every delimiter, regular expression, and chunk-length split runs entirely inside your browser's local memory. Your input strings and split output lines never leave your device or touch any external server.