\n
The node that outputs a single newline (really)
- \n
UC_Newline outputs one newline character. That's the whole node. It has no inputs, no settings, and a single string output containing a line break. If this page feels like overkill, you're not wrong - but it's also not the nothing-node it looks like, because in ComfyUI, putting a literal line break into a string is annoyingly harder than it should be.
The problem it solves is real. Text in ComfyUI flows through JSON when workflows are saved, and JSON escapes newlines. So when you're assembling a multi-line prompt or a structured text block by concatenating several string nodes, you often can't just type a return key and expect it to survive - the line break gets lost, or the field eats it. A dedicated node that emits \n as a proper character is the reliable way to stitch line breaks into a string chain. It sits in the text cluster of silveroxides/ComfyUI-UtilsCollection, right alongside the pack's concatenation nodes.
Where you'd actually wire it
Say you're building a prompt for a VLM or a text-conditioned model that wants several instructions on separate lines. You've got three text nodes. You want line breaks between them. Route each text node into a concatenate, drop this between them in the chain, and you get a clean multi-line string instead of one run-on sentence or a prompt where you had to fight the text box to keep formatting.
It's also handy in the same pack's text-concatenation family - a newline node feeding a "join" or autogrow concatenate node is the standard move for structured text. And if you're feeding strings into nodes that display or log them, the newline keeps reports readable.
What's on the node
Nothing. Zero inputs, zero outputs-of-any-kind except the one STRING socket named \n. The node's whole job is to be the thing you splice in when you need a line break and the text field won't cooperate.
Installing it
Same as every node in the pack:
- ComfyUI Manager: search "ComfyUI-UtilsCollection".
- Or:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
Then restart ComfyUI. It has no dependencies of its own beyond the pack's standard opencv-python and typing-extensions.
Gotchas
The one thing to know is the node emits exactly one newline, not two, not zero - so if your text needs blank lines between paragraphs, you'll want two of these in a row or a concatenate that doubles it. Some text fields in ComfyUI strip trailing whitespace, so if you're putting the newline at the very end of a chain, it might not survive the trip depending on what's consuming it. In the middle of a string, it works every time. It's a silly node, but it's the kind of silly node that quietly unblocks a workflow at midnight.
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| \n | STRING | — |