Call .lower() on a Python string: "Hello, WORLD!".lower() returns "hello, world!". Because the method returns a converted string rather than changing the original, assign the result if you need to keep it.
Use str.lower() for ordinary text
Python’s str.lower() returns a copy of the string with its cased characters converted to lowercase, using Unicode lowercasing. For example:
text = "Hello, WORLD!"
lowercase_text = text.lower()
print(lowercase_text) # hello, world!
The original value in text remains unchanged; the converted value is returned and stored in lowercase_text. You can also use the result directly, such as print(text.lower()). Punctuation and other uncased characters are not converted. See the Python 3.10 built-in types documentation.
Choose lower() or casefold() by purpose
For lowercase text to display or normalize, use lower(). For caseless comparison or matching, use casefold(), which is more aggressive and can change characters beyond their capitalization. For example, "ß".lower() remains "ß", while "ß".casefold() becomes "ss", as shown in the Python documentation for casefold().
#1 Best Overall
Check whether your value is str or bytes
Use str.lower() when your value is decoded text. A bytes value has a separate .lower() method that converts ASCII uppercase byte values; it is not Unicode-aware text lowercasing. If your bytes contain text and you need Unicode casing, decode them to a string first. Python documents the distinction in its pages for str.lower() and bytes.lower().
Quick Recap
Best Value
Rank #2
| Method | Input | Use |
|---|---|---|
str.lower() |
Unicode text (str) |
Convert cased characters to lowercase. |
str.casefold() |
Unicode text (str) |
More aggressive conversion for caseless matching. |
bytes.lower() |
Binary sequence (bytes) |
Convert ASCII uppercase byte values. |
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.




