JavaScript String toLowerCase() Method

Beginner
⏱️ 8 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
Instance method

What You’ll Learn

String.prototype.toLowerCase() returns a new string with every character lowercased using Unicode default rules (same API as MDN String.prototype.toLowerCase()). Learn the no-argument API, case-insensitive compares, when to prefer toLocaleLowerCase(), five examples, and try-it labs.

01

Kind

Instance method

02

Returns

New string

03

Parameters

None

04

Rules

Unicode default

05

Mutates?

No

06

Baseline

Widely available

Introduction

Need every letter in lowercase — for display, search, or a fair comparison? toLowerCase() is the everyday tool.

It uses Unicode default case mappings (not a locale argument). For most English and ASCII text that is exactly what you want. When the UI language has special rules (Turkish dotted/dotless i), reach for toLocaleLowerCase() instead.

💡
Beginner tip

For case-insensitive equality, lowercase both sides: a.toLowerCase() === b.toLowerCase().

This page is part of JavaScript String Methods. Related topics include toLocaleLowerCase() and toLocaleUpperCase().

Understanding the toLowerCase() Method

str.toLowerCase() builds a new string where each character is converted to its lowercase form under Unicode default mappings.

  • Returns a new string — the original is unchanged.
  • Takes no parameters.
  • Great for ASCII / English normalization and case-insensitive checks.
  • For language-specific casing, use toLocaleLowerCase(locales).

📝 Syntax

General form of String.prototype.toLowerCase:

JavaScript
str.toLowerCase()

Parameters

None.

Return value

A new string representing the calling string converted to lower case.

Exceptions

None for normal string values. (Calling on null/undefined without boxing throws in the usual way.)

Common patterns

JavaScript
"ALPHABET".toLowerCase();                    // "alphabet"
"The Quick Brown Fox".toLowerCase();         // "the quick brown fox"
"Hello".toLowerCase() === "HELLO".toLowerCase(); // true
"MiXeD".toLowerCase();                       // "mixed"

⚡ Quick Reference

GoalCode
Lowercase a stringstr.toLowerCase()
Case-insensitive equala.toLowerCase() === b.toLowerCase()
Locale-aware lowercasestr.toLocaleLowerCase(locales)
Uppercasestr.toUpperCase()
Locale-aware uppercasestr.toLocaleUpperCase(locales)

🔍 At a Glance

Four facts to remember about String.toLowerCase().

Returns
string

New lowercased text

Args
none

No locales parameter

Mapping
Unicode

Default case rules

Mutates
no

Immutable string

📋 toLowerCase() vs toLocaleLowerCase()

toLowerCase()toLocaleLowerCase()
Case rulesUnicode default mappingsLocale-specific mappings
Optional argNonelocales (BCP 47)
English / ASCIIIdeal defaultSame result usually
Turkish İMay differ from Turkish UICorrect with "tr"
Best forSimple / locale-agnostic codeUser-facing text in a language

Examples Gallery

Examples follow MDN String.toLowerCase() patterns plus practical beginner tips. Use View Output or Try It Yourself for each case.

📚 Getting Started

MDN demos for everyday lowercasing.

Example 1 — Basic toLowerCase()

MDN Try it demo: lowercase a full sentence.

JavaScript
const sentence = "The quick brown fox jumps over the lazy dog.";

console.log(sentence.toLowerCase());
// Expected output: "the quick brown fox jumps over the lazy dog."
Try It Yourself

How It Works

Every uppercase Latin letter becomes its lowercase form. Spaces and punctuation are left unchanged. The original sentence variable is still mixed-case.

Example 2 — All Caps Word

MDN demo: convert a fully uppercase word.

JavaScript
console.log("ALPHABET".toLowerCase());
// 'alphabet'
Try It Yourself

How It Works

A simple one-liner — ideal for normalizing codes, tags, or keys when locale rules do not matter.

🔧 Everyday Patterns

Comparisons, locale tip, and search prep.

Example 3 — Case-Insensitive Compare

Normalize both sides before using ===.

JavaScript
const a = "Hello";
const b = "HELLO";

console.log(a === b);                         // false
console.log(a.toLowerCase() === b.toLowerCase()); // true
Try It Yourself

How It Works

Raw === is case-sensitive. Lowercasing both sides makes the comparison ignore letter case for typical English text.

Example 4 — When Locale Matters

Turkish capital İ shows why toLocaleLowerCase exists.

JavaScript
const dottedI = "\u0130"; // İ

console.log(dottedI.toLowerCase() === "i");              // false
console.log(dottedI.toLocaleLowerCase("tr") === "i");    // true
Try It Yourself

How It Works

toLowerCase() follows Unicode defaults (often i + combining dot). Turkish mapping yields a plain i. Use the locale method for language-correct casing.

Example 5 — Normalize for Search

Practical pattern: lowercase a query and each label before filtering.

JavaScript
const fruits = ["Apple", "BANANA", "Cherry"];
const query = "BaNaNa";

const matches = fruits.filter(function (name) {
  return name.toLowerCase() === query.toLowerCase();
});

console.log(matches[0]);
// "BANANA"

console.log("MiXeD CaSe".toLowerCase());
// "mixed case"
Try It Yourself

How It Works

Lowercasing both the list item and the query makes matching ignore case while keeping the original display casing in the array.

🎯 Common Use Cases

  • Display normalization — show labels in consistent lowercase.
  • Case-insensitive compare — emails, usernames, tags, codes.
  • Search / filter prep — lowercase query and candidates first.
  • Not for Turkish UI — use toLocaleLowerCase("tr") when language rules matter.
  • Not for sorting — use localeCompare / Intl.Collator.

🧠 How toLowerCase() Works

1

Read the string

No parameters — only the calling string matters.

Input
2

Apply Unicode mappings

Map each character to its default lowercase form.

Transform
3

Build a new string

Non-letters stay as they are; length can change for some scripts.

Result
4

Return the new string

The original string is never modified.

📝 Notes

  • The method does not change str itself — assign the result if you need it.
  • There is no locales argument; use toLocaleLowerCase for that.
  • For fair compares, lowercase both values the same way.
  • Some characters may expand when case-converted (rare in English, common in other scripts).
  • Pair with toUpperCase() when you need the uppercase mirror.

Browser & Runtime Support

String.prototype.toLowerCase() is Baseline Widely available — supported across modern browsers since July 2015 (and long before in practice).

Baseline · Widely available

String.toLowerCase()

Safe for production in browsers and runtimes (Node.js, Deno, Bun). Everyday choice for Unicode-default lowercasing.

Universal Widely available
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
toLowerCase() Excellent

Bottom line: Use String.toLowerCase() for default lowercase conversion and case-insensitive compares. Switch to toLocaleLowerCase() when language-specific rules matter.

Conclusion

String.prototype.toLowerCase() is the simple, reliable way to lowercase text with Unicode defaults — perfect for beginners and for locale-agnostic code. Reach for toLocaleLowerCase() when the UI language changes casing rules.

Continue with toLocaleLowerCase(), replace(), or the String methods hub.

💡 Best Practices

✅ Do

  • Use for ASCII / English normalization
  • Lowercase both sides for case-insensitive equality
  • Keep original casing for display when you only need to compare
  • Prefer toLocaleLowerCase for Turkish and similar
  • Assign the return value — the original does not change

❌ Don’t

  • Pass a locales argument (it is ignored / not part of the API)
  • Expect Turkish İ to match plain i
  • Use case methods to sort lists
  • Assume mutating the variable without assignment
  • Skip normalizing both sides in a compare

Key Takeaways

Knowledge Unlocked

Five things to remember about String.toLowerCase()

No-arg Unicode lowercase — original unchanged.

5
Core concepts
🔢 02

Parameters

none

Args
🌐 03

Mapping

Unicode default

Rule
🔍 04

Compare

lowercase both

Pattern
05

Mutates

no

Immutable

❓ Frequently Asked Questions

String.prototype.toLowerCase() returns a new string with all characters converted to lowercase using Unicode default case mappings. It takes no arguments.
No. Strings are immutable. toLowerCase() returns a new lowercased string; the original stays unchanged.
toLowerCase always uses Unicode default mappings. toLocaleLowerCase can follow language-specific rules (for example Turkish İ). Prefer toLocaleLowerCase for user-facing text in a known language.
Normalize both sides: a.toLowerCase() === b.toLowerCase(). For Turkish and similar locales, use toLocaleLowerCase with the same locale on both sides.
No. If you need locale-aware lowercasing, use toLocaleLowerCase(locales).
Use toUpperCase when you need uppercase text. The APIs are mirrors of each other for default Unicode mappings.
Did you know?

toLowerCase and toUpperCase predate the locale-aware twins. When you only need English/ASCII behavior, the shorter methods keep code clear — switch to toLocale* only when language rules matter.

More String Methods

Return to the hub for slice, trim, replace, and more.

String methods hub →

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.

8 people found this page helpful