Nodes/ComfyUI/Strip Whitespace (DEPRECATED)
ComfyUI Node Runs on cloud

Strip Whitespace (DEPRECATED)

The deprecated twin you should quietly retire

By Comfy-Org·Created 4 years ago·Updated about an hour ago· 129,865
Strip Whitespace (DEPRECATED)
    • texts
    texts

    Strip Whitespace does exactly one thing: it removes leading and trailing whitespace from a text string. And it's marked deprecated, because ComfyUI now ships a better version of the same idea - Trim Text (StringTrim).

    So here's the honest review: if you're building a new graph, don't reach for this one. If a downloaded workflow uses it, relax - it still runs fine, and you can swap in Trim Text whenever you feel like it.

    Why it exists

    This node is part of the newer dataset/text-processing family ComfyUI added in its late-2025 → 2026 node wave (it lives in comfy_extras/nodes_dataset.py, sharing a base class with the other text utilities there). The family includes the case converters and Truncate Text. Some of them stuck; this one was immediately superseded by the Trim Text node, which does the same job but also lets you pick which end(s) to trim.

    How it works

    One input, one output, no settings to misconfigure:

    • texts - "Text to process." A plain single string; the plural name is a leftover from the family design, but this node processes one text per call, not a list.
    • Output texts - the same string with leading and trailing whitespace (spaces, tabs, newlines) removed.

    Mechanically it's a single Python str.strip() call. Deterministic, instant, no model files, no GPU. What you put in comes back with its edges clean and everything else untouched - internal spaces survive, punctuation survives, case survives.

    The one thing that actually trips people up

    Deprecation in ComfyUI is a sticker, not a kill switch. The node still appears in the node list, still executes, and old workflows with it keep working after updates. The "DEPRECATED" tag just tells you the maintainers want new graphs to use Trim Text instead. So you won't hit an error - you'll just be carrying a node that has a cleaner modern equivalent. That's the whole risk profile: you're never going to debug a mysterious failure here, because there's nothing to go wrong.

    If you want the exact same behavior in the current node, set Trim Text's mode to Both and you've got it, plus the option to trim only Left or Right when you need that. Trim Text is also the friendlier search target - searching "trim" finds it, and so does "strip."

    It ships with ComfyUI core. No install, no Manager entry - it's already on your node list.

    Categorytext

    Inputs (1)

    NameTypeDefaultDescription
    textsSTRINGText to process.

    Outputs (1)

    NameTypeDescription
    textsSTRINGProcessed texts