In this tutorial, I will explain how to convert a string to lowercase in Python. As a Python developer, I often encounter situations where I need to modify the case of a string. After research, I found three efficient methods to achieve this task. Let us learn more about this topic.
Convert a String to Lowercase in Python
Let us learn some efficient methods of converting a string to lowercase in Python.
Read How to Split String by Whitespace in Python?
1. Use lower() Method
Python lower() method converts all the characters in a string to lowercase, making it useful for standardizing text.
text = "USA"
result = text.lower()
print(result) Output:
usaI have executed the above example code and added the screenshot below.

The lower() method is essential when converting a string entirely to lowercase, ensuring consistency across your text. It’s particularly useful for case-insensitive comparisons or normalizing text for further processing.
Check out How to Repeat a String Multiple Times in Python?
2. Use swapcase() Method
The swapcase() method changes the case of each character in the string. Uppercase letters become lowercase, and lowercase letters become uppercase.
text = "USA"
result = text.swapcase()
print(result) Output:
usaI have executed the above example code and added the screenshot below.

The swapcase() method is a fun and practical way to invert the case of each character in a string. It’s handy for text transformations where alternating letter cases are needed, such as in text formatting or creating stylized outputs.
Read How to Convert Datetime to String in Python?
3. Use casefold() Method
The loThe casefold() method is a more aggressive version of lower() and is used for case-insensitive comparisons, especially when dealing with different languages.
text = "USA"
result = text.casefold()
print(result) Output:
usaI have executed the above example code and added the screenshot below.

The casefold() method goes a step further than lower() , providing a more robust solution for case-insensitive string comparisons, particularly when dealing with different languages and special characters.
Read How to Check if a String is a Valid UUID in Python?
Conclusion
In this tutorial, I have explained how to convert a string to lowercase in Python. I have explained three main methods to achieve this task such as, lower() method, swapcase() method, casefold() method.
You may also like to read:
- How to Swap Characters in a String Using Python?
- How to Convert a String to ASCII in Python?
- How to Generate a Random String of a Specific Length in Python?

I am Bijay Kumar, a Microsoft MVP in SharePoint. Apart from SharePoint, I started working on Python, Machine learning, and artificial intelligence for the last 5 years. During this time I got expertise in various Python libraries also like Tkinter, Pandas, NumPy, Turtle, Django, Matplotlib, Tensorflow, Scipy, Scikit-Learn, etc… for various clients in the United States, Canada, the United Kingdom, Australia, New Zealand, etc. Check out my profile.