C# String ToLower() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
String

Definition

In C#, ToLower() returns a copy of the string with every letter turned into lowercase. Digits, spaces, and symbols stay the same. The original string is not changed.

With no argument, it follows the rules of the current culture (the language settings of the computer or thread). For most languages that gives the result you expect, but a few cultures have special letters. You can pass a CultureInfo to choose the rules yourself; ToLower(CultureInfo.InvariantCulture) is the same as ToLowerInvariant().

This is an instance member of System.String. Call it on a string variable, such as text.ToLower(...). Calling it on a null variable throws NullReferenceException. C# strings are immutable: ToLower() never changes the original text. It gives back a new string (or the same one when there is nothing to change), so keep the result in a variable.

Syntax

Call it with no argument, or pass the culture whose rules you want.

C#
using System.Globalization;

string s = "Hello C# World";
string a = s.ToLower();                                // "hello c# world" (current culture)
string b = s.ToLower(CultureInfo.InvariantCulture);    // "hello c# world" (fixed rules)
CallWhat it does
text.ToLower()Lowercase using the current culture. Good for text shown to the user.
text.ToLower(CultureInfo.InvariantCulture)Lowercase with fixed rules that are the same on every machine.
text.ToLower(new CultureInfo("tr-TR"))Lowercase with Turkish rules on purpose.

The Turkish I problem: in Turkish, the capital I becomes a dotless ı, not i. So on a computer set to Turkish, "TITLE".ToLower() gives "tıtle". For file names, keys, and codes, use ToLowerInvariant() or compare with StringComparison.OrdinalIgnoreCase instead.

Library declarations
C#
public string ToLower();
public string ToLower(CultureInfo? culture);

Parameters

ParameterDescription
cultureOptional. The culture whose casing rules to use. null means the current culture.

Return Value

Return ValueDescription
stringA lowercase copy. If nothing needed changing, you may get back text equal to the original.

C# Examples

Example 1 — Make a Lowercase Copy

Lowercase a phrase and print the original afterwards to see that it is still mixed case.

C#
using System;

class Program {
    static void Main() {
        string s = "Hello C# World 2026";
        string lower = s.ToLower();

        Console.WriteLine(lower);
        Console.WriteLine(s);
    }
}

How It Works

  1. Letters change. H, C, and W become lowercase.
  2. Everything else stays. The #, the spaces, and the digits have no case, so they are copied as they are.
  3. Safe letters. This phrase contains no capital I, so the result is the same under every culture.
  4. A copy, not an edit. s still prints with its capitals, because strings cannot be changed in place.

Example 2 — Case-Insensitive Check, Two Ways

Compare an answer typed in capitals, first by lowercasing both sides, then with the better OrdinalIgnoreCase option.

C#
using System;

class Program {
    static void Main() {
        string expected = "Yes";
        string typed = "YES";

        Console.WriteLine(expected.ToLower() == typed.ToLower());
        Console.WriteLine(string.Equals(expected, typed, StringComparison.OrdinalIgnoreCase));
        Console.WriteLine(expected == typed);
    }
}

How It Works

  1. Way one: lowercase both. Both sides become yes, so == is True. It works, but it builds two temporary strings.
  2. Way two: compare directly. OrdinalIgnoreCase ignores case while comparing, with no copies and no culture surprises.
  3. Plain == is strict. Without either trick, Yes and YES are different, so the last line is False.
  4. Why way two is safer. With words that contain I, the lowercase trick can break on a Turkish system. The ordinal comparison never does.

Example 3 — Lowercase a File Extension with Fixed Rules

Read a file extension and lowercase it with the invariant culture, so the check behaves the same on every computer.

C#
using System;
using System.Globalization;

class Program {
    static void Main() {
        string file = "PHOTO.JPG";
        string ext = file.Substring(file.LastIndexOf('.')).ToLower(CultureInfo.InvariantCulture);

        Console.WriteLine(ext);
        Console.WriteLine(ext == ".jpg");
    }
}

How It Works

  1. Find the extension. The last dot is at index 5, and Substring(5) copies .JPG.
  2. Chain the call. ToLower(...) runs on the copied extension right away and returns .jpg.
  3. Choose fixed rules. CultureInfo.InvariantCulture is not tied to any country, so a file named FILE.ICO would also give .ico on a Turkish machine.
  4. Shorter spelling. ToLowerInvariant() does exactly the same and needs no using System.Globalization;.

Frequently Asked Questions

It returns a new string with all letters in lowercase, using the current culture rules. Non-letters are unchanged, and the original string stays the same.
ToLower() uses the current culture, so results can differ between computers. ToLowerInvariant() uses fixed invariant rules and gives the same result everywhere.
In Turkish, uppercase I lowercases to a dotless ı, and lowercase i uppercases to İ with a dot. Code that uses ToLower() or ToUpper() for comparisons can therefore fail on Turkish systems.
Usually not. Use string.Equals(a, b, StringComparison.OrdinalIgnoreCase). It avoids extra strings and culture problems.
No. Strings are immutable, so it returns a new string. Assign it: text = text.ToLower();

Next: ToLowerInvariant()

Get a lowercase copy using fixed invariant rules that are the same on every machine.

ToLowerInvariant() 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