---
title: "gsql_trim()"
component: "gsql-ref"
version: "3.11"
module: "ddl-and-loading"
html_url: "/gsql-ref/3.11/ddl-and-loading/functions/token/gsql_trim"
canonical_url: "https://www.tigergraph.com/docs/gsql-ref/3.11/ddl-and-loading/functions/token/gsql_trim"
markdown_url: "https://www.tigergraph.com/docs/gsql-ref/3.11/ddl-and-loading/functions/token/gsql_trim.md"
---

[View as HTML](https://www.tigergraph.com/docs/gsql-ref/3.11/ddl-and-loading/functions/token/gsql_trim)

# gsql_trim()

Trims whitespace from the beginning and end of the input string.

## Syntax

`gsql_trim(in_string)`

## Parameters

in\_string

Required. The string whose leading and trailing whitespace to trim.

## Return type

`STRING`

## Example

gsql_trim("  hello world  ") -> "hello world"
