ComfyUI > Nodes > Basic data handling > splitlines (to LIST)

ComfyUI Node: splitlines (to LIST)

Class Name

Basic data handling: StringSplitlinesList

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 (to LIST) Description

StringSplitlinesList node splits strings into line-based lists for flexible text processing.

splitlines (to LIST):

The StringSplitlinesList node is designed to facilitate the handling of strings by splitting them at line boundaries, effectively breaking down a single 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 using this node, you can easily manage and manipulate each line individually. The node also offers the flexibility to include line breaks in the resulting list if desired, making it adaptable to various text processing needs.

splitlines (to 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 and split into a list of lines.

keepends

The keepends parameter is a boolean option that dictates whether line breaks should be included in the resulting list of lines. By default, this parameter is set to False, meaning line breaks are not included. If set to True, each line in the output list will retain its line break, which can be useful for maintaining the original formatting of the text.

splitlines (to LIST) Output Parameters:

LIST

The output of the StringSplitlinesList node is a LIST of strings, where each element represents a line from the original input string. This output allows you to handle each line separately, enabling further processing or analysis. The inclusion of line breaks in the output list depends on the keepends parameter setting.

splitlines (to LIST) Usage Tips:

  • Use the keepends parameter to control whether line breaks are included in the output list, which can be helpful for preserving the original text format.
  • This node is ideal for processing text data that is naturally divided into lines, such as configuration files or logs, allowing you to focus on individual lines for detailed analysis.

splitlines (to LIST) Common Errors and Solutions:

Invalid input type for string

  • Explanation: The input provided to the string parameter is not a valid string.
  • Solution: Ensure that the input is a string. Convert other data types to a string format before passing them to the node.

Unexpected behavior with keepends

  • Explanation: The output list does not include line breaks as expected.
  • Solution: Verify the keepends parameter setting. Set it to True if you want line breaks included in the output list.

splitlines (to 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 (to LIST)