---
title: "How to separate first and last names from a single form field"
description: "Are your apps having trouble communicating? Find out how to automatically split text that comes in from the tools you use most, so you're sending the right data to your marketing platforms."
image: "https://images.ctfassets.net/lzny33ho1g45/zapier-formatter-guide-p-img/03c11a2d66243e8d4dc9db80b183eb61/Hero.jpg"
---

# How to separate first and last names from a single form field

Are your apps having trouble communicating? Find out how to automatically split text that comes in from the tools you use most, so you're sending the right data to your marketing platforms.

You've launched your marketing campaign, and the leads are rolling in. But there's a problem: the contact names are in one line. Meanwhile, your CRM, email marketing tool—and just about everything else—breaks out contacts into first and last names. 

Your marketing ops team is angry that they have to manually [clean up the data](https://zapier.com/blog/google-sheets-data-cleanup). Or maybe _you're _the marketing ops person who's on cleanup duty. So what can you do?

Don't beat yourself up. Automation can help. Zapier is an automation tool that enables you to reduce manual tasks between apps. You can also use a built-in feature called Formatter to automatically split text that comes in from the apps you use most—before the info hits your marketing platforms. 

We'll show you how to use a _Split Text _function in your Zaps—the automated workflows you create with Zapier—to split any text and avoid manual data cleanup. 

### Table of contents

- [What is Split Text in a formatter step?](#split-text)
- [Before you begin](#before)
- [How to split text with a formatter step](#how-to)
- [Map your split text](#map)

## What is _Split Text_ in a formatter step?

Formatter is Zapier's built-in utility tool for Zaps. When the information from an app isn't in the format you need, a formatter step can transform it into something you can use in later Zap steps.

We're just going to focus on one [Formatter](https://zapier.com/blog/zapier-formatter-guide/) function for now—Split Text—though there's a lot more you can do with it, like change capitalization, date formats, or remove characters.

Split Text does just what it describes. You can tell Zapier the text you want to split,_ how_ you'll split it, and_ how much_ of that split text you wish to use. Once you've set it up, your formatter step will do it for you automatically every time your Zap runs.

## Before you begin

We'll assume that you're a little familiar with how Zapier works. And if you aren't, don't worry: [It's free to sign up ](https://zapier.com/sign-up/)for a Zapier account. We also have a guide to help you [get up to speed on Zap basics](https://zapier.com/learn/zapier-quick-start-guide/). You'll need to [be in the Zap editor](https://zapier.com/app/editor) for this tutorial, where you can create Zaps from scratch. You should have your Zap created to the point where you need to split text. 

In this example, we need to split text from a Typeform submission. If you're using another form app, that's fine. Just select your form app as the trigger, and keep following along. We're going to put our formatter step right after our trigger—the event starting our Zap.

## How to split text with a formatter step

Click the** plus sign** to add a step to your Zap. Then, click on** Format** located on the right-hand side. 

Click on the dropdown menu underneath _Action Event_ and select** Text.** Click **Continue. **

Click on the dropdown underneath_ Transform_, then search for and select **Split Text.** 

Now you'll see the settings for splitting text:

1. **Input: **The actual thing you want the formatter step to split.
2. **Separator: **The character or word separator you want the formatter step to split your text on.
3. **Segment Index: **After Zapier splits your text, how much of it you want back to use in later steps of your Zap.

We'll go over how to configure these settings. 

### Select your input

The _Input_ field will need the text you're telling Zapier to separate. Click inside the field. You'll see a dropdown menu of data from previous steps in your Zap. Search for and select the item you want to split. 

In this example, we want to split full names into first and last names. We've selected the form question where a lead would enter their name. 

### Pick your separator 

Now you need to tell the formatter step where to split the text—this can be a word or a special character, like dashes or commas. 

If you need to split a string of text based on spaces, new lines, tabs, or returns, a formatter step can do it—but hitting the spacebar won't cut it. You need to tell the formatter step in a specific way: by putting your instructions between two square brackets and two colons. [Learn more here.](https://zapier.com/help/create/format/modify-text-formats-in-zaps#find-replace-or-split-special-characters)

Since we want the formatter step to split the full name at the space between "Bruce" and "Wayne," we've typed in _[:space:]_. Now the formatter step understands that we want it to split text whenever there's a space in our form response.  

### Choose which segment you want returned

Now you can decide which segments of your split text you want Zapier to return to you. 

Click on the dropdown beneath _Segment Index. _You'll see a list of options. 

**Here's what they mean: **

- **First: **Zapier will return only the first segment of the split text. In our example, it would return "Bruce."
- **Second: **Zapier will only return the last segment of the split text. For example, if our lead submitted his full name—middle included—the formatter step would return "Thomas."
- **Last:** Zapier will only return the last segment of the split text. (Example: "Wayne".)
- **Second to Last:** Zapier will return only the second-to-last segment of our split text. For example, if we wanted to split an address and our lead submitted "Wayne Tower, Gotham City," the formatter step would return "Gotham."
- **All (as Line-items): **Zapier will return our segments as a[ line-item array](https://zapier.com/help/create/format/create-line-items-in-zaps). _Only use this if you're sending this split text segment to an app with line-item support._** **If an app has line-item support, it'll say so on its integration page in [Zapier's App Directory](https://zapier.com/apps).
- **All (as Separate Fields):** Zapier will return our split text, breaking each segment into separate fields. That will allow us to map our fields to different lines. In our example, "Bruce" would be its own field, as well as "Wayne," allowing us to map it to separate _First Name_ and _Last Name_ fields in our CRM.

For our example, we want the formatter step to return our split text segments as All (as Separate Fields). 

Once you've made your selection, click** Continue. **

### Test the formatter step

Now it's time to test our formatter step. We can check that Zapier is splitting our text how we want it. 

You can skip this test if you like, but we highly recommend testing so you can preview and make any changes. You'll use this test to finish creating your Zap. 

Click on **Test & Review. **

You'll see a success message and how the formatter step performed the split text. You can go back to the previous step, adjust your settings, and retest if something looks off. 

Once you're happy with how your split text looks, click **Close. **

## Map your newly-split text 

Now you need to put that split text somewhere! Click the plus sign button to add another step to your Zap. 

Select your action app and action event, and connect your app account. 

When you're ready to use your split text, click inside the field where you want it to go. You'll see a dropdown menu of data from previous steps in your Zap. Click on the upside-down caret next to _Text. _

You'll see the split text segments the formatter step created earlier. Click on the segments you want to map to your field. 

In our example, we mapped our split text segments "Bruce" and "Wayne" to the appropriate _First Name _and _Last Name_ fields in our CRM. 

Finish creating your Zap, test it, and don't forget to turn it on! 

## Split text: Your marketing ops secret weapon

Don't let manual data cleanup slow down your marketing efforts. With a formatter step's Split Text function, you can automatically transform information into the format you need. Now you can focus your time on executing campaigns and reporting the results.  

## **Do more with Formatter by Zapier**

Want to automate more of your work with text? Check out the other tutorials in this series for more ways to use Formatter.

- [The Zapier Formatter guide: How to automatically format text the way you want](https://zapier.com/blog/zapier-formatter-guide/)
- [How to separate first and last names from a single form field](https://zapier.com/blog/how-to-separate-names-into-first-and-last/)
- [How to change date and time formats in your text automatically](https://zapier.com/blog/format-datetimes/)
- [Automatically find and match related data across apps](https://zapier.com/blog/find-match-data-across-apps/)
- [The Zapier guide to line items](https://zapier.com/blog/formatter-line-item-automation/)
- [Automatically extract data from your apps](https://zapier.com/blog/extract-data-from-apps/)