split

Learn how to use the split function in Notion formulas.

New in Formulas 2.0

The split() function separates the first argument into a list, using the second argument to define the separation.

split(string, string)
split(string)

string.split(string)
string.split()
Code language: JavaScript (javascript)

Note that if the second argument is not supplied, the string will be split at the space character.

split("One Two Three") /* Output: ["One", "Two", "Three"] */
Code language: JavaScript (javascript)

Good to know: numbers can be used in the first and second arguments, but both the arguments and the resulting list items will be converted into strings. For example, split(13214215, 2) will return ["13", "14", "15"]
If you needed to convert those strings back into numbers, you would need to use the map function and its current variable → split(13214215, 2).map(toNumber(current)) will return [13, 14, 15]

split("Luffy, Zoro, Nami, Chopper", ", ") 
/* Output: ["Luffy", "Zoro", "Nami", "Chopper"] */

"https://thomasjfrank.com/formulas/functions/split".split("/")
/* Output: ["thomasjfrank.com", "formulas", "functions", "split"] */

Code language: JavaScript (javascript)
About the Author

My name is Thomas Frank, and I'm a Notion-certified writer, YouTuber, and template creator. I've been using Notion since 2018 to organize my personal life and to run my business and YouTube channel. In addition to this formula reference, I've created a free Notion course for beginners and several productivity-focused Notion templates. If you'd like to connect, follow me on Twitter.

🤔 Have an UB Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas

🤔 Have a Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas