Text Splitter

Split text by custom delimiters, characters, or patterns

Key Facts

Category
Text & Writing
Input Types
textarea, select, text, checkbox
Output Type
text
Sample Coverage
4
API Ready
Yes

Overview

The Text Splitter is a versatile utility designed to break down large blocks of text into manageable segments based on specific delimiters, character counts, or linguistic patterns.

When to Use

  • Converting comma-separated values or logs into a clean, readable list.
  • Breaking long paragraphs into individual sentences or words for analysis.
  • Standardizing text data by splitting it into fixed-length chunks for database imports.

How It Works

  • Paste your source text into the input area.
  • Select your preferred split method, such as by lines, words, or a custom delimiter.
  • Configure optional settings like trimming whitespace or preserving empty parts.
  • Choose your desired output format and generate the processed text instantly.

Use Cases

Parsing CSV data or log files into structured lists.
Preparing text for natural language processing by tokenizing sentences.
Cleaning up messy copy-pasted data by removing unwanted whitespace and formatting.

Examples

1. Converting CSV to a Numbered List

Data Analyst
Background
You have a long string of comma-separated email addresses that need to be reviewed individually.
Problem
The raw string is difficult to read and verify for duplicates.
How to Use
Paste the email string, set Split Type to 'Custom Delimiter' with a comma, and choose 'Numbered List' as the output format.
Example Config
Split Type: Custom, Delimiter: ',', Output: Numbered List
Outcome
A clean, numbered list of email addresses ready for verification.

2. Tokenizing Sentences for Analysis

Content Writer
Background
You need to analyze the sentence structure of a long article.
Problem
The text is currently one large block, making it hard to count or evaluate individual sentences.
How to Use
Paste the article text, select 'Split by Sentences', and choose 'Newline Separated' for the output.
Example Config
Split Type: Sentences, Output: Newline Separated
Outcome
The article is broken down into a list where each sentence occupies its own line.

Try with Samples

markdown, text

Related Hubs

FAQ

Can I use regular expressions as a custom delimiter?

Yes, the custom delimiter field supports regex patterns to provide advanced splitting capabilities.

What happens if I select 'Trim Each Part'?

Enabling this option automatically removes any leading or trailing whitespace from each resulting segment.

Can I export the result as a JSON array?

Yes, simply select 'JSON Array' in the output format settings to receive your data in a structured format.

Does the tool support splitting by specific character counts?

Yes, select the 'Split by Length' option to divide your text into equal segments of 80 characters.

Will empty lines be removed from the output?

By default, empty parts are removed. You can toggle 'Preserve Empty Parts' to keep them in your final output.

API Documentation

Request Endpoint

POST /en/api/tools/text-splitter

Request Parameters

Parameter Name Type Required Description
textInput textarea Yes -
splitType select Yes -
customDelimiter text No -
outputFormat select Yes -
preserveEmpty checkbox No -
trimParts checkbox No -

Response Format

{
  "result": "Processed text content",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}
Text: Text

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-text-splitter": {
      "name": "text-splitter",
      "description": "Split text by custom delimiters, characters, or patterns",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=text-splitter",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]