Request a demo

BigQuery · String function

BigQuery INITCAP

INITCAP(value[, delimiters]) capitalizes the first letter of each word and lowercases the rest: INITCAP('mary-jane SMITH') returns Mary-Jane Smith. An optional second argument sets which characters separate words.

GoogleSQL for BigQuery · Checked against the official reference in November 2026

INITCAP converts a string to title case: the first character of each word is uppercased and every other letter is lowercased. Non-letters are left as they are. By default, words are separated by whitespace and a long list of punctuation, including -, _, ., ,, /, (, ), & and @. The apostrophe is not in that list, so o'neil becomes O'neil.

The optional delimiters argument replaces the default list. INITCAP(name, ' ') treats only spaces as separators, and INITCAP(name, " '") makes both spaces and apostrophes start a new word. If either argument is NULL, the result is NULL.

Because every non-initial letter is lowercased, INITCAP flattens names such as McDonald and acronyms such as USA. Use it for display, not to clean data you will compare later; compare with LOWER or UPPER instead.

Syntax

INITCAP(value[, delimiters])

Arguments and return value

ArgumentDescription
valueThe STRING to convert.
delimitersOptional STRING of characters that separate words. Replaces the default set of whitespace and punctuation.

Returns: STRING. NULL if value or delimiters is NULL.

Examples

Default word separators

SELECT
  INITCAP('mary-jane SMITH') AS hyphenated,
  INITCAP('new_york city') AS underscore,
  INITCAP('3rd street') AS starts_with_digit;
Result
hyphenatedunderscorestarts_with_digit
Mary-Jane SmithNew_York City3rd Street

Apostrophes and custom delimiters

SELECT
  INITCAP("o'neil") AS default_delimiters,
  INITCAP("o'neil", " '") AS space_and_apostrophe,
  INITCAP('mary-jane', ' ') AS spaces_only;
Result
default_delimitersspace_and_apostrophespaces_only
O'neilO'NeilMary-jane

Names that title case gets wrong

SELECT
  INITCAP('McDONALD') AS mixed_case_name,
  INITCAP('ACME USA INC') AS acronym;
Result
mixed_case_nameacronym
McdonaldAcme Usa Inc

Common mistakes

  • Expecting apostrophes to start a word. With the default delimiters o'neil becomes O'neil; pass " '" as delimiters for O'Neil.
  • Running INITCAP over curated values. It lowercases every non-initial letter, so McDonald, iPhone and USA are changed.
  • Passing a delimiters list and forgetting the space. INITCAP(value, '-') no longer treats spaces as separators, so new york-city becomes New york-City.

FAQ

How do I convert a string to title case in BigQuery?

Use INITCAP(value). It uppercases the first letter of each word and lowercases the rest.

How do I capitalize only the first letter of a string?

CONCAT(UPPER(LEFT(value, 1)), LOWER(SUBSTR(value, 2))). INITCAP would capitalize every word.

Which characters does INITCAP treat as word separators?

By default whitespace and [ ] ( ) { } / | \ < > ! ? @ " ^ # $ & ~ _ , . : ; * % + -. Pass a second argument to use your own set.

More string functions

All BigQuery string functions · All functions · BigQuery error messages

Observability for every BigQuery table, in about 15 minutes

Masthead detects freshness, volume and schema anomalies, monitors pipeline errors and maps column-level lineage across all your projects, from logs and metadata only.