> ## 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.

# SaveText - ComfyUI Built-in Node Documentation

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

The Save Text node writes text content to a file in the output directory. It supports saving in three different file formats: plain text (.txt), Markdown (.md), and JSON (.json). When saving as JSON, the node attempts to parse the input text as valid JSON and format it with proper indentation.

## Inputs

| Parameter         | Description                                         | Data Type | Required | Range                             |
| ----------------- | --------------------------------------------------- | --------- | -------- | --------------------------------- |
| `text`            | The text content to save to a file                  | STRING    | Yes      |                                   |
| `filename_prefix` | Prefix for the output filename (default: "ComfyUI") | STRING    | No       |                                   |
| `format`          | File format to save the text as (default: "txt")    | STRING    | No       | `"txt"`<br />`"md"`<br />`"json"` |

## Outputs

| Output Name | Description                                          | Data Type |
| ----------- | ---------------------------------------------------- | --------- |
| `text`      | The original text content that was saved to the file | STRING    |

> 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/SaveText/en.md)

***

**Source fingerprint (SHA-256):** `5644d143f415773115b38d7af6d9afea20c9eadef2cea836b0384c15e0dcba6a`
