Lodash _.lowerCase() Method

Beginner
⏱️ 7 min read
📚 Updated: Jul 2026
🎯 6 Examples + 3 Try It
String utilities

What You’ll Learn

By the end of this tutorial, you’ll confidently use Lodash’s _.lowerCase() method in real JavaScript projects.

01

Core syntax

Call _.lowerCase(string) for spaced lowercase.

02

Word boundaries

camelCase splits into separate words.

03

Search normalize

Compare queries case-insensitively.

04

vs toLowerCase

Native case vs Lodash word rules.

05

vs lowerFirst

Whole string vs first char only.

06

Production tips

Normalize once before indexing.

What Is _.lowerCase()?

It converts a string to lowercase and separates words with spaces, following Lodash word-boundary rules.

💡
Beginner tip

Import only what you need: import lowerCase from "lodash/lowerCase" keeps bundles small.

📝 Syntax

javascript
_.lowerCase([string=''])
javascript
import lowerCase from "lodash/lowerCase";

const original = "Hello World!";
const result = lowerCase(original);

console.log(result);
// -> "hello world"

⚡ Quick Reference

TaskCode patternResult
Basic phrase_.lowerCase('Hello World!')hello world
From camelCase_.lowerCase('fooBar')foo bar
Search normalize_.lowerCase(query)Comparable text
Filter arrayitems.filter(i => _.lowerCase(i).includes(q))Case-insensitive
Native comparestr.toLowerCase()Case only, no spaces
First char only_.lowerFirst(str)helloWorld style
Mutates?
No

Returns new string

Spacing
Words spaced

Not compact

Case
All lower

Full string

Related
_.upperCase()

Uppercase variant

🧰 Parameters

Every argument to _.lowerCase() and what it controls:

stringOptional

The string to convert. When omitted or empty, returns an empty string.

_.lowerCase('Hello World')
return valueNew string

Lowercase words separated by spaces. The original string is unchanged.

// -> 'hello world'
separatorsImplicit

Spaces, hyphens, underscores, punctuation, and case changes define word boundaries before lowercasing.

_.lowerCase('foo_bar-baz')
edge casesImportant

Punctuation is stripped, not preserved. Non-strings are coerced; numbers become string digits.

_.lowerCase('Élève')

For compact lowercase without word spacing, use native String.prototype.toLowerCase(). For hyphens instead of spaces, use _.kebabCase().

Examples Gallery

Practical _.lowerCase() patterns with copy-ready code and interactive Try It Yourself labs.

📚 Getting Started

Convert phrases and camelCase identifiers to lowercase words.

Example 1 — Basic phrase conversion

Turn a greeting with punctuation into lowercase words separated by spaces.

javascript
const original = "Hello World!";
const result = _.lowerCase(original);

console.log(result);
// -> "hello world"
Try It Yourself

How It Works

Punctuation is removed and words are lowercased with spaces between them.

📈 Practical Patterns

Normalize data and power case-insensitive search.

Example 2 — camelCase to spaced lowercase

Split a JavaScript identifier into readable lowercase words.

javascript
const input = "fooBarBaz";
const result = _.lowerCase(input);

console.log(result);
// -> "foo bar baz"
Try It Yourself

How It Works

Capital letters signal word boundaries before lowercasing.

Example 4 — Accented characters

Lowercase strings containing accented Latin letters.

javascript
const input = "HÉLLÖ WÖRLD";
const result = _.lowerCase(input);

console.log(result);
// -> "héllö wörld"

How It Works

Unicode letters are lowercased while word spacing rules still apply.

🚀 Beyond the Basics

Edge cases and comparisons with native methods.

Example 5 — Non-string coercion

Numbers and empty strings are handled safely.

javascript
console.log(_.lowerCase(""));
console.log(_.lowerCase(123));
// -> ""
// -> "123"

How It Works

Lodash coerces non-strings before applying case rules.

Example 6 — vs String.toLowerCase()

See how native lowercasing differs from Lodash word spacing.

javascript
import lowerCase from "lodash/lowerCase";

const input = "fooBar";

console.log(input.toLowerCase());  // -> "foobar"
console.log(lowerCase(input));     // -> "foo bar"

// lowerFirst only changes the first character:
console.log(_.lowerFirst("FooBar"));  // -> "fooBar"

How It Works

Use toLowerCase() when you only need case change; use _.lowerCase() when you need word separation too.

🧠 How _.lowerCase() Works

1

Receive input string

Lodash coerces null/undefined to an empty string.

Input
2

Detect word boundaries

Spaces, punctuation, and case changes define words.

Split
3

Lowercase segments

Each word is converted to lowercase.

Lower
=

Join with spaces

Words are joined with single spaces.

Output

📝 Notes

  • _.lowerCase() adds spaces—not the same as toLowerCase().
  • For URL slugs use _.kebabCase(), not lowerCase.
  • Normalize both sides of a comparison for reliable search.
  • Non-string values are coerced before processing.
  • Pair with _.upperCase() for title-style output.
  • For only the first character, use _.lowerFirst().

Conclusion

_.lowerCase() is the go-to Lodash helper when you need lowercase text with readable word spacing—ideal for search normalization, display labels from camelCase keys, and data cleanup.

When you only need to change letter case, use toLowerCase(). For URL slugs or CSS tokens, reach for _.kebabCase() instead.

💡 Best Practices

✅ Do

  • Normalize user input before search or sort
  • Use for display labels derived from camelCase keys
  • Pair with includes() for simple case-insensitive filters
  • Test accented characters for your locales
  • Import lodash/lowerCase for tree-shaking

❌ Don’t

  • Use for URL slugs (use kebabCase instead)
  • Assume it matches toLowerCase() output
  • Confuse with lowerFirst for identifier casing
  • Skip normalization on only one side of a comparison
  • Use when you need to preserve original spacing exactly

Key Takeaways

Knowledge Unlocked

Five things to remember about _.lowerCase()

5
Core concepts
02

Boundaries

camelCase splits.

Rules
03

Search

Normalize both sides.

Pattern
04

toLowerCase

Case only.

Compare
05

lowerFirst

First char only.

Related

❓ Frequently Asked Questions

It converts a string to lowercase and separates words with spaces, following Lodash word-boundary rules.
toLowerCase() only changes letter case. _.lowerCase() also splits camelCase and symbols into spaced lowercase words.
_.lowerFirst() lowercases only the first character. _.lowerCase() lowercases the entire string and adds spaces between words.
Yes. Lowercasing both the query and haystack with _.lowerCase() helps case-insensitive comparisons.
Lodash lowercases Unicode letters where supported; test with your target locales.
Numbers are preserved. Non-string inputs are coerced to strings first.
Did you know?

_.lowerCase() is the lowercase counterpart of _.upperCase()—both add spaces at word boundaries. For URL slugs use _.kebabCase(); for only the first character, use _.lowerFirst().

Practice _.lowerCase() in the Live Editor

Open the Try It editor and run the examples with your own input.

Open Try It editor →

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.

6 people found this page helpful