VOOZH about

URL: https://www.geeksforgeeks.org/cpp/tolower-function-in-cpp/

⇱ tolower() Function in C++ - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

tolower() Function in C++

Last Updated : 25 May, 2026

The tolower() function in C++ is used to convert an uppercase alphabet character into its lowercase equivalent. It is a predefined function available in the <cctype> header file.

  • It converts uppercase characters (A-Z) into lowercase characters (a-z).
  • Lowercase letters, digits, and special symbols remain unchanged.

Example: Convert Single Character to Lowercase


Output
G in lowercase is represented as = g

Syntax

int tolower(int ch);

Parameter:

  • ch: Character to be converted into lowercase

Return Value:

  • The function returns the ASCII value of the lowercase character corresponding to the given character.

Header File:

#include <cctype>

Example: Convert String to Lowercase


Output
geeksforgeeks

Note:  If the character passed in the tolower() is any of these three

  1. lowercase character
  2. special symbol
  3. digit

tolower() will return the character as it is.

Example: Lowercase Conversion with Digits and Symbols


Output
geeks@123
Comment
Article Tags: