Recipe 1

Trim whitespace

Built-in action

Part of the Cleaning Recipes Guide · Last updated: 2026-03-31

Remove extra spaces from the start, end, or middle of selected columns.

Best for CRM imports where names, emails, or SKUs contain accidental padding like “ Alice ”.

This page is intentionally detailed so you can understand not only which recipe to choose, but also how to prepare your CSV, what to expect during the apply flow, and what to verify after the change runs. That makes it easier to use saved recipes confidently on recurring imports instead of cleaning values by hand.

If you are comparing similar actions, start with the recipe preview below, then work through the screenshots and verification checklists further down the page. Those sections are designed to mirror the real UI you will see in Online CSV Editor.

Recipe preview
Saved recipe
Contact cleanup
Trim whitespace in Name, Email

Targets columns with padded text before export.

Example row
Leading and trailing spaces removed
Before
alice@example.com
After
alice@example.com
1. Pick the action
Configure the recipe in the modal before running it on the table.
2. Review the preview
Confirm the recipe details and apply only when the rule looks correct.
3. Export clean data
Use the apply summary to verify the result before exporting the CSV.

First-time walkthrough for beginners

If this is your first time using Trim whitespace, follow these steps in order. The screenshots below come from the real product flow so you can compare your screen with the guide as you go.

Step 1

Open a file and find one example you want to fix

Start by loading your CSV or a sample file into the editor. Before opening the recipe tools, look for one real example that should change, such as " Alice ". That gives you something concrete to compare after the recipe runs.

  • Check whether the issue appears in one column or across several columns.
  • If the file is large, note a few rows you can revisit after applying the recipe.
Online CSV Editor with a sample file loaded and the Recipes button visible in the toolbar.
The editor toolbar is where most guide workflows begin: load a CSV sample, open Recipes, then apply or save a cleaning flow before exporting.
Step 2

Open Recipes and start a new recipe draft

Click the Recipes button in the toolbar. Beginners can choose New recipe or Start from example, then save a reusable recipe after they confirm the action works the way they expect.

  • Use Start from example if you want to learn the recipe editor with a safe starter action already loaded.
  • Saved recipes stay browser-local unless you deliberately share the definition.
The Cleaning Recipes modal open inside Online CSV Editor, showing saved recipes and actions.
The Cleaning Recipes modal lets you create, review, save, duplicate, share, and apply repeatable recipe actions without sending CSV data to a server.
Step 3

Configure trim whitespace in the editor

This action is usually the easiest first recipe to learn. Most beginners should start with a sample row that contains extra spaces, then decide whether all columns or only text columns such as Name and Email should be cleaned.

  • Choose All columns for a broad cleanup pass, or switch to By name if only columns like Name or Email should change.
  • Keep Include headers off unless the header row itself contains stray spaces.
  • Use Trim Mode = Both for most imports, and only enable Collapse internal whitespace when values like “New York” should become “New York”.
The recipe editor open inside Online CSV Editor with a starter recipe and action settings visible.
The recipe editor is where beginners name the recipe, choose the action, adjust settings such as columns or rule mode, and save the workflow for reuse.
Step 4

Apply the recipe and confirm the result before export

Apply the action, then compare the changed table against the expected result "Alice". Use the apply summary together with the example panel below to confirm the recipe did what you intended before exporting the CSV.

  • Make sure the output now matches the intended result, such as "Alice".
  • Read the apply summary and confirm that the changed row or cell count matches your expectation.
  • Export the CSV only after scanning a few rows near the top, middle, and bottom of the file to catch edge cases.

Quick version

  1. Open a CSV, click Recipes in the editor toolbar, then choose New recipe.
  2. Add the Trim whitespace action and pick all columns or the specific columns you want to clean.
  3. Choose whether to trim left, right, or both sides, then apply the recipe and review the result summary.

Example

Before
" Alice "
After
"Alice"

Use collapse internal whitespace only when values such as “New York” should become “New York”.

Before you run this recipe

  • Identify the exact columns or rows that trim whitespace should change before you open the recipe form.
  • Keep one visible example in mind, such as " Alice ", so you can compare the result after the recipe runs.
  • If you expect to repeat this cleanup on future imports, save the recipe with a descriptive name instead of applying it only once.

What to verify after applying

  • Make sure the output now matches the intended result, such as "Alice".
  • Read the apply summary and confirm that the changed row or cell count matches your expectation.
  • Export the CSV only after scanning a few rows near the top, middle, and bottom of the file to catch edge cases.

Common mistakes beginners should avoid

  • Turning on Collapse internal whitespace when repeated spaces are meaningful in the original data.
  • Trimming headers by accident and changing column names that an import target expects exactly.

When this recipe is the right choice

Use Trim whitespace when you want a repeatable cleanup rule instead of manual editing across many rows. The strongest clue is the use case itself: Best for CRM imports where names, emails, or SKUs contain accidental padding like “ Alice ”.

In practice, this recipe is most valuable when the same cleanup problem appears in recurring exports from CRMs, spreadsheets, analytics tools, or ecommerce platforms. Saving the recipe means you can apply the same standard every time a similar CSV arrives, which is exactly what makes the guide useful for long-term workflows rather than one-off fixes.

Use this recipe in context

Open the editor, import your file, click Recipes in the toolbar, and apply this action on its own or combine it with other saved actions. If you want the recipe to run immediately when a file opens, use the Apply recipe on import dropdown in the importer first.

For the best results, treat this page as a reusable operating note: review the example, compare it to your live CSV, run the saved action, and then return to the guide whenever you need to train a teammate or document a repeatable cleanup process.