---
title: "Trim Whitespace"
description: "Local-first visual environment for building and running AI workflows. Build agents visually, deploy anywhere, privacy by design."
canonical: https://docs.nodetool.ai/nodes/nodetool/text/trimwhitespace
markdown: https://docs.nodetool.ai/nodes/nodetool/text/trimwhitespace.md
product: NodeTool
source: https://github.com/nodetool-ai/nodetool/blob/main/docs/nodes/nodetool/text/trimwhitespace.md
---

# Trim Whitespace

**Type:** `nodetool.text.TrimWhitespace`

**Namespace:** `nodetool.text`

## Description

Trims whitespace from the start and/or end of text.
    text, whitespace, clean, remove

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| text | `str` |  | `` |
| trim_start | `bool` |  | `true` |
| trim_end | `bool` |  | `true` |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| output | `str` |  |

## Related Nodes

Browse other nodes in the [nodetool.text](./) namespace.
