---
schema_version: "1"
id: a2e3fc5540d155798c339256fe3e388312825a0fced811c63c0a631d7ace7099
title: TRIM
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/customize_functions_trim.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.customize_functions_trim.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b3495c2c5377253293c5019aeae669ca376c7ab89c82068e0bee20a86682afad
description: Removes the spaces and tabs from the beginning and end of a text string.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# TRIM

Removes the spaces and tabs from the beginning and end of a text string.

## Use

`TRIM(text)` and replace text with the field or expression you want to trim.

![Formula Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

Formula Example `TRIM(LEFT(LastName,5))& "-" & RIGHT(FirstName, 1)` returns a network ID for users that contains the first five characters of their last name and first character of their first name separated by a dash.