> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Trim

Removes leading and trailing spaces from a given string.

## Usage

`Trim(text)`

**text** (required) Text or a column of text.

## Example

```
Trim(" John Doe ")
```

* Returns “John Doe”

```
Trim([First Name])
```

* Returns:

![](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/1676f8b4a0b7298ae066f09466159a1d908db650c80b170874a83699720c9892/assets/docs-images/988b3b5-mceclip0.png)

## Related resources

* [LTrim](/docs/ltrim)
* [RTrim](/docs/rtrim)