ComfyUI > Nodes > ComfyUI > Strip Whitespace

ComfyUI Node: Strip Whitespace

Class Name

StripWhitespace

Category
dataset/text
Author
ComfyAnonymous (Account age: 763days)
Extension
ComfyUI
Latest Updated
2026-05-13
Github Stars
112.77K

How to Install ComfyUI

Install this extension via the ComfyUI Manager by searching for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI 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

Strip Whitespace Description

Efficiently removes leading and trailing whitespace from text inputs to streamline text processing and ensure data accuracy.

Strip Whitespace:

The StripWhitespace node is designed to efficiently remove any leading and trailing whitespace from text inputs. This node is particularly useful when you need to clean up text data by eliminating unnecessary spaces that may have been inadvertently added during data entry or processing. By ensuring that text strings are free from extraneous whitespace, the node helps maintain consistency and accuracy in text-based operations, such as data analysis, text comparison, or formatting tasks. The primary goal of this node is to streamline text processing by providing a straightforward method to clean up text inputs, making it an essential tool for anyone working with text data.

Strip Whitespace Input Parameters:

text

The text parameter is the input string from which you want to remove leading and trailing whitespace. This parameter accepts any string value, and its primary function is to serve as the source text that will be processed by the node. There are no specific minimum or maximum values for this parameter, as it can handle any length of text. The default value is an empty string, which means if no text is provided, the node will simply return an empty string.

Strip Whitespace Output Parameters:

output

The output parameter is the processed string that results from the removal of leading and trailing whitespace from the input text. This output is crucial for ensuring that the text data is clean and free from unnecessary spaces, which can affect data processing and analysis. The output value is a string that reflects the cleaned version of the input text, making it ready for further use in various applications.

Strip Whitespace Usage Tips:

  • Use the StripWhitespace node to clean up text data before performing operations like text comparison or analysis to ensure accuracy and consistency.
  • Integrate this node into your text processing workflow to automatically handle whitespace issues, especially when dealing with user-generated content or data from multiple sources.

Strip Whitespace Common Errors and Solutions:

Input text is not a string

  • Explanation: The node expects the input to be a string, but a different data type was provided.
  • Solution: Ensure that the input text is a valid string. Convert any non-string data types to a string before passing them to the node.

Unexpected output format

  • Explanation: The output does not match the expected format, possibly due to incorrect input handling.
  • Solution: Double-check the input text to ensure it is correctly formatted and free from unexpected characters or data types that may affect the output.

Strip Whitespace Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
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.

Strip Whitespace