ComfyUI > Nodes > Basic data handling > splitlines (from data list)

ComfyUI Node: splitlines (from data list)

Class Name

Basic data handling: StringSplitlinesDataList

Category
Basic/STRING
Author
StableLlama (Account age: 861days)
Extension
Basic data handling
Latest Updated
2026-05-07
Github Stars
0.04K

How to Install Basic data handling

Install this extension via the ComfyUI Manager by searching for Basic data handling
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Basic data handling in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

splitlines (from data list) Description

Splits strings into line-separated lists for efficient line-by-line text data processing.

splitlines (from data list):

The StringSplitlinesDataList node is designed to handle strings by splitting them at line boundaries, effectively breaking down a string into a list of lines. This node is particularly useful when you need to process or analyze text data that is organized in lines, such as logs, scripts, or any multi-line text. By utilizing this node, you can easily manage and manipulate each line separately, which can be beneficial for tasks that require line-by-line processing. The node offers an option to include line breaks in the resulting list, providing flexibility depending on whether you need to retain the original formatting of the text. This capability makes it an essential tool for AI artists who work with text data, allowing for efficient data handling and preparation.

splitlines (from data list) Input Parameters:

string

The string parameter is the main input for the node, representing the text that you want to split into lines. It accepts any string value, and the default is an empty string. This parameter is crucial as it determines the content that will be processed by the node. The input string can be any length, and the node will handle it by identifying line boundaries and splitting accordingly.

keepends

The keepends parameter is an optional boolean that determines whether line breaks should be included in the resulting list of lines. By default, this parameter is set to False, meaning that line breaks are not included. If set to True, each line in the output list will retain its original line break, which can be useful if you need to preserve the exact formatting of the input text. This parameter provides flexibility in how the output is structured, allowing you to choose the format that best suits your needs.

splitlines (from data list) Output Parameters:

STRING

The output of the StringSplitlinesDataList node is a data list of strings, where each element in the list represents a line from the input string. This output format allows for easy manipulation and processing of individual lines, making it ideal for tasks that require detailed analysis or modification of text data. The inclusion of line breaks, if specified by the keepends parameter, ensures that the output can closely match the original text structure when needed.

splitlines (from data list) Usage Tips:

  • Use the keepends parameter to retain line breaks if you need to maintain the original text formatting, which can be important for certain types of text analysis or when reassembling the text later.
  • Consider using this node when working with text files or logs that are organized by lines, as it simplifies the process of accessing and manipulating each line individually.

splitlines (from data list) Common Errors and Solutions:

Invalid input type for string

  • Explanation: This error occurs when the input provided to the string parameter is not a valid string type.
  • Solution: Ensure that the input is a string. If you are passing data from another node, verify that it outputs a string.

Unexpected behavior with keepends

  • Explanation: If the keepends parameter is not behaving as expected, it might be due to incorrect boolean values being passed.
  • Solution: Double-check that the keepends parameter is set to either True or False. Ensure that no other data types are being used for this parameter.

splitlines (from data list) Related Nodes

Go back to the extension to check out more related nodes.
Basic data handling
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

splitlines (from data list)