Convert Text Case
Four ways to yell or whisper at your prompt
- STRING
Convert Text Case (CaseConverter) changes the capitalization of a string - all caps, all lower, first-letter, or title case. On the surface it's the most trivial node in the string family. But it earns its keep the moment you're normalizing text from outside sources: an LLM that insisted on ALL CAPS, a caption file with inconsistent case, a booru tag list you want in a consistent format before it hits your prompt.
Where does case actually matter in a ComfyUI workflow? Usually as normalization, not aesthetics. If you're comparing strings downstream (see the Compare Text and Contains Text nodes), case differences are the classic silent failure - "Masterpiece" never equals "masterpiece." Run both sides through this node first, in the same case, and your comparisons stop lying to you. Or you're generating filenames and want them uniform. Or a model family that reacts to ALL CAPS emphasis - turning a word uppercase is a real prompting move in some tag-based lineages, and this node is how you'd script it.
How it works
Under the hood it's four Python string methods, one per mode:
- UPPERCASE →
string.upper()- every letter to caps. - lowercase →
string.lower()- everything to lowercase. - Capitalize →
string.capitalize()- first letter up, the rest of the string forced to lowercase. That last part surprises people: "hELLO wORLD" becomes "Hello world," not "Hello WORLD." - Title Case →
string.title()- the first letter of every word capitalized, everything else lowered.
One input, string (multiline), and a mode dropdown with exactly those four options. Output is a single STRING. There's no "sentence case" and no "camelCase" - if you need those, you're past what this node does. And there's no option to leave the rest of the string untouched while uppercasing only the first letter (Python's capitalize won't give you that), so pick your mode knowing what it does to the middle of the text.
Common issues
The gotchas are both about the capitalize behavior: people expect "hELLO" → "Hello," and it is - but also "hELLO WORLD" → "Hello world," all-lowercased after the first letter. If that's wrong for your use, Title Case is usually the better guess for normalizing prose. Second: case conversion doesn't touch whitespace or punctuation - a string with a leading space still has it after conversion, which is why combining this with a trim node is the standard cleanup pair. And remember the output is text: wiring an uppercase prompt into a model that treats case as emphasis is a real effect, but it's a style choice - if all you wanted was a consistent format for comparison, lowercase both sides and be done.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| string | STRING | — | |
| mode | COMBO | 4 options: UPPERCASE, lowercase, Capitalize, Title Case |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |