Skip to content
notionsolutions

A practical library for building,
organizing and working in Notion.

Formula guides

Notion Formula to Capitalize the First Letter: Names, Words, Sentences

Notion has no capitalize function, but substring(), upper() and lower() do the job. Copy the first-letter, each-word and sentence formulas, see what they return for spaces, hyphens and all-caps names, and decide whether an automation should write the clean name back.

Published
Three steel rails of white tiles where the first tile in each row stands taller with a blue top, beside loose tiles behind a frosted glass panel
Capitalize the first character of each word and keep the rest as typed unless all-caps entries need lower() as well.

Notion has no capitalize function, but two documented ones do the job: substring() takes the first character, upper() turns it into a capital, and you add the rest of the text back. Copy the line below and replace "Name" with your own property. For client names typed in lowercase, I'd use the each-word version further down, because "acme studio" should become "Acme Studio", not "Acme studio".

upper(substring(prop("Name"), 0, 1)) + substring(prop("Name"), 1)

Choose the formula by what the property holds

The formula recipes go into a formula property, which shows a corrected copy next to the original entry. Pick one by the text you need to clean:

Which capitalization formula fits the text
Text in the propertyUseWhat changes
A label or single word typed in lowercaseFirst letterThe first character only
Client and contact namesEach wordThe first letter of every word separated by a space
Entries that arrive in all capsEither version with lower() addedEverything after each capital becomes lowercase
Task titles or notes with several sentencesEach sentenceThe first letter of the text and the first letter after every period followed by a space
Text you type on a pageNo formula; see the typing sectionDepends on your keyboard settings or Notion AI

For most client databases I'd start with each word and keep the rest of every name as typed, because it fixes names typed in lowercase without touching a name like McDonald that's already right. Add lower() only if all-caps submissions keep arriving: it fixes "JOHN SMITH" and also turns "NASA" into "Nasa".

Capitalize the first letter

Positions in Notion text start at 0. Notion's formula syntax reference defines substring() as running from the start index, which is included, to the end index, which is excluded, and gives substring("Notion", 0, 3) = "Not" and substring("Notion", 3) = "ion". So substring(prop("Name"), 0, 1) is the first character and substring(prop("Name"), 1) is everything after it. upper() converts the first piece, and + joins the two pieces of text.

Formulas also accept dot notation, where the function follows the value it works on. This line returns the same result:

prop("Name").substring(0, 1).upper() + prop("Name").substring(1)

The rest of the recipes use dot notation because the longer ones chain several steps, and a chain reads left to right.

Lowercase the rest as well

To fix entries typed in capitals, lowercase the remainder before adding it back:

prop("Name").substring(0, 1).upper() + prop("Name").substring(1).lower()

That turns "ACME STUDIO" into "Acme studio". It also turns "McDonald" into "Mcdonald", because lower() converts every remaining letter. Keep the rest unchanged when your records include brand names, surnames with an internal capital or acronyms.

Handle blanks and stray spaces

A pasted or form-submitted name can carry a space before the first letter, and some rows are simply blank. This version cleans the input once and then capitalizes it:

let(
  clean, prop("Name").trim(),
  /* a blank Name stays blank */
  if(empty(clean), "", clean.substring(0, 1).upper() + clean.substring(1))
)

To check a recipe, open the formula editor from a database row: Notion's formulas help says the editor then shows a live preview of the result for that row. I'd open it on the messiest name in the database first, since it exposes problems a tidy row hides. If the editor flags a type error instead, check what the property returns; our guide to formula errors with Date, Text, List and empty inputs shows how to trace an input type, with dates as the worked case.

Capitalize each word in a name

For client and contact names, split the text into words, capitalize each one and join them again:

let(
  clean, prop("Name").trim().replaceAll(" +", " "),
  if(empty(clean), "",
    clean.split(" ").map(current.substring(0, 1).upper() + current.substring(1)).join(" ")
  )
)
  1. trim() removes spaces at both ends, and replaceAll(" +", " ") turns any run of spaces into one. In a regular expression, + means "one or more", as Thomas Frank's replace() reference explains, and Notion documents replaceAll() as replacing every match.
  2. split(" ") turns "acme design studio" into a list of three words: "acme", "design" and "studio".
  3. map() runs the first-letter expression on every item in that list, with current standing for the word being processed.
  4. join(" ") puts the words back together with a single space between them.
Four-step diagram turning "acme   design studio" into "Acme Design Studio": trim and replaceAll collapse the spaces, split makes three words, map capitalizes each first letter, join rebuilds the name
The each-word formula cleans the spacing first, then capitalizes every word and joins the list back into one name.

For all-caps entries, lowercase the whole name in the first step so every word starts from the same place:

let(
  clean, prop("Name").trim().replaceAll(" +", " ").lower(),
  if(empty(clean), "",
    clean.split(" ").map(current.substring(0, 1).upper() + current.substring(1)).join(" ")
  )
)

Only a space starts a new word. "mary-jane o'neil" becomes "Mary-jane O'neil", because the hyphen and the apostrophe don't split the text. The formula handles spacing and first letters; you still decide how names like Mary-Jane, O'Neil or McDonald should be spelled. I'd correct those few records by hand rather than stack more rules into the formula, because every extra rule is another place where a correct name can break.

In a Clients database like the one in our freelancer CRM workflow, I'd add this as a formula property next to Name, so the original entry stays visible while you decide whether the fix should become permanent.

Capitalize the start of each sentence

If you only need the first letter of the whole text, the first-letter formula already does it. For task titles or notes with several sentences, split on a period followed by a space instead of on a space:

let(
  clean, prop("Name").trim(),
  if(empty(clean), "",
    clean.split(". ").map(current.substring(0, 1).upper() + current.substring(1)).join(". ")
  )
)

"call acme. send the revised quote" becomes "Call acme. Send the revised quote". The limit is plain: this formula only recognizes ". " as a sentence break. A sentence that follows "?", "!" or a line break keeps its lowercase letter, and an abbreviation such as "e.g. " counts as a break. Leave lower() out of this one, because it would also lowercase names and the word "I" inside your sentences.

What each formula returns

Here is what each recipe returns for entries a client database typically collects. The last column traces every result to the function behavior that produces it, so you can predict the output for your own records before you add the property.

What each formula returns for typical entries
Entry as typedFormulaResultWhy
acme studioFirst letterAcme studiosubstring(0, 1) is "a", upper() makes it "A", and substring(1) adds "cme studio"
acme studioEach wordAcme Studiosplit(" ") gives two words, each gets a capital, and join(" ") restores the space
ACME STUDIOFirst letterACME STUDIOThe first letter is already a capital and the rest is kept as typed
ACME STUDIOEach word with lower()Acme Studiolower() runs first, then each word gets its capital
McDonald consultingEach wordMcDonald ConsultingThe rest of each word is kept as typed
McDonald consultingEach word with lower()Mcdonald Consultinglower() also turns the D into d
NASA grantEach word with lower()Nasa GrantAcronyms lose their capitals the same way
iPhone repairFirst letterIPhone repairupper() converts whatever letter sits at position 0
mary-jane o'neilEach wordMary-jane O'neilOnly a space starts a new word
ana lopez, typed with a leading spaceFirst letter, basic lineUnchanged, space includedPosition 0 holds the space, so no letter is converted; the blanks-and-spaces version returns Ana lopez
mary jane, typed with two spacesEach wordMary Jane, with one spacereplaceAll(" +", " ") collapses the spaces before split(" ") runs
BlankAny version with empty()Blankempty("") is true, so if() returns ""
call acme. send the revised quoteEach sentenceCall acme. Send the revised quotesplit(". ") gives two sentences and each gets a capital
done? send the invoiceEach sentenceDone? send the invoiceThe text has no ". ", so only the first letter changes

Make the clean name permanent with an automation

A formula property shows the corrected copy, while the Name property keeps whatever was typed. If you want the record itself to hold the clean version, a database automation can write it there. Notion's database automations help sets the conditions: automations need a paid plan and full access to the database, and guests can't create them. On the Free plan you can create Slack notification automations only, so the formula property is the fix there.

I'd write into a separate Text property first, such as Clean name, because a wrong formula then fills a spare column instead of overwriting client names. Switch the target to Name once the results look right, and test that change on a copy of the database first.

  1. Click the lightning-bolt icon at the top of the database, then New automation.
  2. Select New trigger, choose Property edited and pick Name. If records also arrive through a client intake form, add Page added as a second trigger and choose When any of these occur.
  3. Select New action, choose Edit property and pick Clean name, or Name once you've tested it.
  4. In the value field, select ∑ to write a formula. Select Trigger page in the list on the left, type a period right after it, and select Name, the same steps Notion's help gives for its own Trigger page examples.
  5. Wrap that reference in the each-word recipe, then select Create.
let(
  clean, Trigger page.Name.trim().replaceAll(" +", " "),
  if(empty(clean), "",
    clean.split(" ").map(current.substring(0, 1).upper() + current.substring(1)).join(" ")
  )
)
Automation diagram with Property edited on Name and Page added as triggers, an Edit property action that writes a formula built on Trigger page.Name into Clean name, and a row where acme design studio becomes Acme Design Studio
Point the automation at a spare Clean name property first, so the typed Name stays intact while you check the results.

A few rules shape how this behaves:

Our guide to defining the trigger, action and exception helps you settle which records the automation should touch before you build it. If you'd rather run the cleanup with a click, use a button instead. Notion's buttons help says buttons are available on all plans, with some actions limited to paid plans. Our comparison of buttons and database automations shows when a click is the better trigger.

Capitalizing text as you type on a page

If you meant ordinary page text rather than a database value, there's no formula to write. Notion's editor has no change-case command: its writing and editing basics list Markdown shortcuts and block actions, and none of them change letter case. Three routes cover most needs:

Questions that come up next

Does this work on a Title property and a Text property?

Yes. A Title property and a Text property both give the formula plain text, so prop("Name") behaves the same way for either. Relation and Rollup properties can return lists instead, and a list needs a different approach before any of these recipes apply.

Why do some guides use dozens of replaceAll() calls?

Some guides start from the premise that formulas can't change capitalization and simulate it with one replaceAll() call per letter, 26 of them for lowercase alone. Notion's function reference lists upper() and lower(), which convert text to uppercase and lowercase directly, so the three-function recipes above do the same job in a few lines. replace() and replaceAll() swap each match for the replacement text you supply, and the reference doesn't document a replacement that changes case, so I'd keep case work in upper() and lower().

Can Notion AI write the formula for me?

On Business and Enterprise plans, the formula editor has a Notion AI field where you describe what the formula should do, and Notion lists "Make this formula handle edge cases" among its example prompts. Compare whatever it produces with the results table above before you rely on it in a client database.

Keep building the formula