> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# TruncateText - ComfyUI Built-in Node Documentation

> Complete documentation for the TruncateText node in ComfyUI. Learn its inputs, outputs, parameters and usage.

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/TruncateText/en.md)

This node shortens text by cutting it off at a specified maximum length. It takes any input text and returns only the first part, up to the number of characters you set. It is a simple way to ensure text does not exceed a certain size.

## Inputs

| Parameter    | Data Type | Required | Range      | Description                                                                             |
| ------------ | --------- | -------- | ---------- | --------------------------------------------------------------------------------------- |
| `text`       | STRING    | Yes      | N/A        | The text string to be truncated.                                                        |
| `max_length` | INT       | No       | 1 to 10000 | Maximum text length. The text will be cut off after this many characters (default: 77). |

## Outputs

| Output Name | Data Type | Description                                                                           |
| ----------- | --------- | ------------------------------------------------------------------------------------- |
| `string`    | STRING    | The truncated text, containing only the first `max_length` characters from the input. |
