# Remove whitespace at the end of text

**URL:** <https://community.make.com/t/remove-whitespace-at-the-end-of-text/85294>\
**Category:** Questions\
**Tags:** text-replace, text-parser, string-functions\
**Created:** [June 20, 2025, 7:11pm UTC](https://community.make.com/t/remove-whitespace-at-the-end-of-text/85294 "2025-06-20T19:11:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joao\_Lucas](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@Joao\_Lucas](https://community.make.com/u/Joao_Lucas)\
**Post date:** [June 20, 2025, 7:11pm UTC](https://community.make.com/t/remove-whitespace-at-the-end-of-text/85294/1 "2025-06-20T19:11:09Z")

</div>

I have a string that arrives from a webhook but this string has a blank space at the end of the text and I can’t remove it, what do I do?

 ![Captura de tela 2025-06-20 161042](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/6/e/6ef294637c6f2fb6d614f5ea0f1b9fa214258a52.png)

---

<div class="post-metadata">

**Author:** ![Greatness\_Solutions](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/greatness_solutions/32/93374_2.png) [@Greatness\_Solutions](https://community.make.com/u/Greatness_Solutions)\
**Post date:** [June 20, 2025, 7:25pm UTC](https://community.make.com/t/remove-whitespace-at-the-end-of-text/85294/2 "2025-06-20T19:25:17Z")

</div>

If you are referring to what you have screenshot, That’s not a white space, it’s an object with a key and value pair

---

<div class="post-metadata">

**Author:** ![Joao\_Lucas](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@Joao\_Lucas](https://community.make.com/u/Joao_Lucas)\
**Post date:** [June 20, 2025, 7:33pm UTC](https://community.make.com/t/remove-whitespace-at-the-end-of-text/85294/3 "2025-06-20T19:33:45Z")

</div>

ok, but how i can remove this? because i need to search “Campos do Jordão” on a sheet and not "Campos do Jordão "

---

<div class="post-metadata">

**Author:** ![Victorus](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/victorus/32/74459_2.png) [@Victorus](https://community.make.com/u/Victorus)\
**Post date:** [June 20, 2025, 7:37pm UTC](https://community.make.com/t/remove-whitespace-at-the-end-of-text/85294/4 "2025-06-20T19:37:04Z")

</div>

If you need to clean a string one day, you can use a Text Parser module with a Regex formula ⬇

```auto
\s+$

```

**As you can see here in this example ⬇**

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/0/b/0bda1815cb45f11b3ac73d6db44f8d913f0fd9df.png)

**Here is the text parser config ⬇**

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/5/2/5208332fc92f6cdfdd00103e9fb421cc282ce2d9.png)

**And here is the result ⬇**

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/6/6/66234201ae07960c35e6ac92645c6de2f65c34dd.png)

Everything about Regex is explained in the Advanced Course of Make Academy 🙂

---

<div class="post-metadata">

**Author:** ![Greatness\_Solutions](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/greatness_solutions/32/93374_2.png) [@Greatness\_Solutions](https://community.make.com/u/Greatness_Solutions)\
**Post date:** [June 20, 2025, 7:46pm UTC](https://community.make.com/t/remove-whitespace-at-the-end-of-text/85294/5 "2025-06-20T19:46:45Z")

</div>

For simplicity, just use the trim() inline function in make com

---

<div class="post-metadata">

**Author:** ![Greatness\_Solutions](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/greatness_solutions/32/93374_2.png) [@Greatness\_Solutions](https://community.make.com/u/Greatness_Solutions)\
**Post date:** [June 20, 2025, 7:48pm UTC](https://community.make.com/t/remove-whitespace-at-the-end-of-text/85294/6 "2025-06-20T19:48:06Z")

</div>

It removes any white space at the begining and end of a string

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [June 21, 2025, 4:50pm UTC](https://community.make.com/t/remove-whitespace-at-the-end-of-text/85294/7 "2025-06-21T16:50:34Z")

</div>

Welcome to the Make community!

To do this, you can use the built-in function `replace` — “Replaces the search string with the new string.”

> ### `{{ replace (text; search string; replacement string) }}`

e.g.:

```plaintext
{{ replace(1.text; "/\s*$/"; emptystring) }}

```

_(copy-paste the above into the field, or type it exactly as shown)_

For more information, the function’s documentation can be found in the [Help Centre](https://help.make.com/string-functions#3jHFB). You should also complete the tutorials in the [Make Academy](https://academy.make.com).

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

### Getting Started

- [Help Centre](https://www.make.com/en/help) | [Tutorials](https://help.make.com/create-your-first-scenario) – Make “Manual” - search for help here first
- [Make Academy](https://academy.make.com) – Basics 101: Learn Make properly to get your money’s worth

### Help Centre Basics

- [Mapping](https://help.make.com/mapping) – What is mapping? What can I map?
- [Mapping with arrays](https://help.make.com/mapping-arrays) – How to map items in an array
- [Aggregate an array for mapping complex fields](https://help.make.com/flow-control#VhcUm)
- **Date Format** : [tokens for `parseDate`](https://help.make.com/tokens-for-datetime-parsing) | [tokens for `formatDate`](https://help.make.com/tokens-for-datetime-formatting)
- [HTTP modules](https://apps.make.com/http) – Make a request, Get (download) a file
- [Webhooks](https://help.make.com/webhooks) – Error Handling, Responding to webhooks

### Articles & Videos

- [Router Magic Formula](https://www.youtube.com/watch?v=4Q-5BsCtJu4) - YouTube
- [Error Handlers in Make](https://www.youtube.com/playlist?list=PLRE9E-rAD8U10mx2TRs54Nq1XJDdK9Kx4) - YouTube playlist
- [Getting started with OpenAI](https://community.make.com/t/getting-started-with-openai-gpt-3-and-make/7796) - How to setup and use OpenAI (ChatGPT) in Make
- [Text Parser module](https://help.make.com/text-parser) - Use pattern matching to extract the text you want
- [Webhooks – Make Academy](https://academy.make.com/courses/IntermediateC04) – tutorial on how to use Webhooks

— @samliew

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [July 4, 2025, 7:42pm UTC](https://community.make.com/t/remove-whitespace-at-the-end-of-text/85294/8 "2025-07-04T19:42:29Z")

</div>


