Lodash _.toLower() Method

Beginner
5 min read
Updated: Nov 2026
5 examples
String

Definition

Converts a string, as a whole, to lowercase — same idea as String#toLowerCase. Separators stay put; only letters change case. Part of Lodash String (stable since 4.0.0 — not deprecated).

Pass the string and options shown below. Check the return type before you chain another helper.

Syntax

Call _.toLower. Start with this line.

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

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

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

Parameters

ParameterDescription
stringOptional. Value to convert (default ''; non-strings are coerced)

Return Value

Return ValueDescription
*New lowercased string

Lodash Examples

Example 1 — Official: Hyphenated String

Lowercase letters; keep the dashes.

Lodash
console.log(_.toLower("--Foo-Bar--"));
// '--foo-bar--'
Try It Yourself

How It Works

  1. Input. Mixed-case text with hyphens.
  2. Convert. Each letter becomes lowercase.
  3. Keep. - characters stay in place.
  4. Docs. Matches the official first example.

Example 2 — Official: camelCase Collapses Visually

Case goes away — word boundaries from capitals disappear.

Lodash
console.log(_.toLower("fooBar"));
// 'foobar'
Try It Yourself

How It Works

  1. Input. fooBar uses a capital for the second word.
  2. Lower. B becomes b.
  3. Result. One flat word: foobar.
  4. Tip. Prefer _.kebabCase if you need separators.

Example 3 — Official: Underscored Caps

Underscores stay; letters drop to lowercase.

Lodash
console.log(_.toLower("__FOO_BAR__"));
// '__foo_bar__'
Try It Yourself

How It Works

  1. Input. Uppercase identifier-style string.
  2. Convert. FOO / BAR become lowercase.
  3. Keep. Underscores are unchanged.
  4. Docs. Matches the official third example.

Example 4 — Case-Insensitive Compare

Normalize both sides before comparing.

Lodash
var a = "Hello";
var b = "HELLO";

console.log(_.toLower(a) === _.toLower(b));
// true
Try It Yourself

How It Works

  1. Normalize. Lowercase both strings.
  2. Compare. Strict equality ignores original casing.
  3. Use. Handy for emails, tags, and user input.
  4. Note. Locale-specific letters may need extra care.

Example 5 — Pair with _.toUpper

Same input, opposite case helpers.

Lodash
var s = "Foo-Bar";

console.log(_.toLower(s)); // 'foo-bar'
console.log(_.toUpper(s)); // 'FOO-BAR'
Try It Yourself

How It Works

  1. toLower. All letters become lowercase.
  2. toUpper. All letters become uppercase.
  3. Shared. Both keep the hyphen.
  4. Next. See the _.toUpper tutorial.

Browser & Runtime Support

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

✓ Stable · Lodash 4.x

_.toLower()

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

100% With Lodash 4.x
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
_.toLower Since 4.0.0

Bottom line: Safe for production once Lodash is on the page. Prefer import toLower from "lodash/toLower" for smaller builds. Native String#toLowerCase is fine when you do not need Lodash.

Frequently Asked Questions

_.toLower([string='']) converts the whole string to lowercase, like String#toLowerCase. Official: _.toLower('--Foo-Bar--') → '--foo-bar--'.
_.toLower only changes letter case and keeps separators. _.lowerCase splits into space-separated words (e.g. '--Foo-Bar--' → 'foo bar').
For plain strings they usually match. Lodash coerces non-strings first and fits the rest of the Lodash string API.
No. Strings are immutable. _.toLower always returns a new string.
Yes. Compare _.toLower(a) === _.toLower(b) when casing should be ignored.
Use import toLower from "lodash/toLower" or require("lodash/toLower"). Full build: import _ from "lodash" then _.toLower.

Next: _.toUpper()

Convert a string to uppercase characters.

_.toUpper() 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