Lodash _.startCase() Method

Beginner
5 min read
Updated: Nov 2026
5 examples
String

Definition

Converts string to Start Case — words separated by spaces, each starting with an uppercase letter. Part of Lodash String since 3.1.0 (stable — not deprecated).

Note: Best for headings and labels, not JavaScript identifiers. For code-style names use _.camelCase or _.snakeCase.

Syntax

Call _.startCase. Start with this line.

Lodash
_.startCase([string=''])
CallWhat it does
_.startCase([string=''])Primary signature.
_.startCase(string)Transform or inspect a string.

Prefer import startCase from "lodash/startCase" when you want a smaller bundle.

Library declarations
Lodash
_.startCase([string=''])

Parameters

ParameterDescription
stringOptional. Input to convert; default ''

Return Value

Return ValueDescription
*New Start Case string

Lodash Examples

Example 1 — Official: Kebab / Punctuation

Hyphens and extra dashes become word boundaries.

Lodash
_.startCase('--foo-bar--');
// → 'Foo Bar'
Try It Yourself

How It Works

  1. Strip noise. Leading/trailing - are separators.
  2. Words. foo and bar.
  3. Start case. → Foo, Bar.
  4. Join. Space between → Foo Bar.

Example 2 — Official: camelCase

Capital letters mark new words for display.

Lodash
_.startCase('fooBar');
// → 'Foo Bar'
Try It Yourself

How It Works

  1. Boundary. B starts a new word.
  2. Words. foo + bar.
  3. Title each. Foo + Bar.
  4. Use. Turn prop names into headings.

Example 3 — Official: ALL CAPS Tokens

All-caps words can remain uppercase after splitting.

Lodash
_.startCase('__FOO_BAR__');
// → 'FOO BAR'
Try It Yourself

How It Works

  1. Split. Underscores separate FOO and BAR.
  2. Casing. All-caps tokens stay FOO / BAR.
  3. Join. Space → FOO BAR.
  4. Expect. Verify acronyms if you need Title Case instead.

Example 4 — From snake_case

Common path: DB/API keys → readable labels.

Lodash
_.startCase('foo_bar');
// → 'Foo Bar'
Try It Yourself

How It Works

  1. Boundary. _ separates words.
  2. Words. foo, bar.
  3. Start case. → Foo Bar.
  4. Pair. Often follows _.snakeCase in reverse for UI.

Example 5 — vs capitalize / camelCase

Same input; different jobs.

Lodash
var s = 'FOO BAR';

_.startCase(s);    // → 'FOO BAR'
_.capitalize(s);   // → 'Foo bar'
_.camelCase(s);    // → 'fooBar'
Try It Yourself

How It Works

  1. startCase. Per-word; all-caps tokens may stay caps.
  2. capitalize. Only the first character of the whole string.
  3. camelCase. Identifier form, no spaces.
  4. Pick. Labels → startCase; sentences → capitalize; code → camelCase.

Browser & Runtime Support

_.startCase is a Lodash String helper since 3.1.0. It runs anywhere Lodash runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install lodash.

✓ Stable · Lodash 3.1.0+

_.startCase()

Available in [email protected] full builds and the lodash/startCase modular import. Works in evergreen browsers and current Node LTS when Lodash is installed.

100% With Lodash 3.1+
Google Chrome Supported · Desktop & Mobile
Full support
Mozilla Firefox Supported · Desktop & Mobile
Full support
Apple Safari Supported · macOS & iOS
Full support
Microsoft Edge Supported · Chromium
Full support
Internet Explorer No native support · Use a polyfill
Polyfill
Opera Supported · Modern versions
Full support
Samsung Internet Supported · Android
Full support
Bun Supported · JavaScript runtime
Supported
Deno Supported · JavaScript runtime
Supported
Node.js Supported · Server runtime
Supported
Android WebView Supported · Modern WebView
Full support
_.startCase Lodash 3.1.0+

Bottom line: Safe for production once Lodash is loaded. Prefer import startCase from "lodash/startCase" for smaller bundles. Use it to turn keys and slugs into readable labels.

Frequently Asked Questions

_.startCase([string='']) converts a string to Start Case: space-separated words with each word’s first character uppercased. Official: _.startCase('--foo-bar--') → 'Foo Bar'.
No. JavaScript strings are immutable. It always returns a new string.
_.capitalize uppercases only the first character of the whole string and lowercases the rest (e.g. 'FOO BAR' → 'Foo bar'). _.startCase treats each word.
startCase is for human-readable labels (spaces, title-like words). camelCase is for JavaScript identifiers (no spaces).
Official: _.startCase('__FOO_BAR__') → 'FOO BAR'. All-caps word tokens can stay uppercase after splitting.
Use import startCase from "lodash/startCase" or require("lodash/startCase") for tree-shaking. Full build: import _ from "lodash" then _.startCase.

Next: _.startsWith()

Check whether a string begins with a given target.

_.startsWith() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful