# String

Learn about the String data type in Notion formulas.
The String data type holds and represents text content. Strings can hold nearly any character by default.
You can create a string by wrapping characters within quotation marks `"`. This includes numbers, "true/false", etc. If you wrap characters in quotation marks, you'll create a string.
1
"Monkey D. Luffy"
2
3
"42"
4
5
"true"
Strings can be concatenated, i.e. combined. You can do so with the concat function and with the add operator `+`:
1
"Monkey D. Luffy" + " will be " + "King of the Pirates!"
2
// Output: Monkey D. Luffy will be King of the Pirates!
3
4
concat("Monkey D. Luffy", " will be ", "King of the Pirates!")
5
// Output: Monkey D. Luffy will be King of the Pirates!
You cannot perform mathematical operations on strings. Notion does not do automatic type conversion, so you'll need to convert strings to numbers manually.
If a string contains nothing but a number, you can convert it using the toNumber function or the unaryPlus operator `+`:
1
// Invalid: Will throw a Type Mismatch error
2
3
4
// Valid
5
6
7
// Also valid
8

## Comparing Strings

You can compare strings using the equal `==` and unequal `!=` operators and related functions.
Good to know: As noted above, Notion formulas do not do automatic type conversion. Therefore, the equal and unequal operators test for strict equality. In JavaScript, this would be done with the `===` operator.
1
"Monkey" == "Monkey" // Output: true
2
3
"Monkey" == "monkey" // Output: false (comparison is case-sensitive)
4
5
"Goku" != "Vegeta" // Output: true

## Escaping Characters

Some special characters must be escaped with the backslash character `\` in order to represented property in a Notion formula.
Character
Escape Sequence
Double Quote `"`
`\"`
Backslash `\`
`\\`
Newline
`\n`
Tab
`\t`
Carriage Return
`\r`
Backspace character
`\b`
Important notes:
• Double quotes `"` will become un-escaped whenever you re-open and edit your formula. You'll need to re-escape them every time you make an edit.
• Single quotes `'` do not need to be escaped. If you wrap a string in single quotes, they'll be converted to double quotes the next time you open the formula for editing.
Here's a reference database that contains all of these escaped characters, which you can duplicate:

#### 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.