> This page location: String Functions > LOWER
> Full Neon documentation index: https://neon.com/docs/llms.txt

# PostgreSQL LOWER() Function

**Summary**: in this tutorial, you will learn how to use the PostgreSQL `LOWER()` function to convert the string to all lowercase.

## Introduction to the PostgreSQL LOWER() function

The `LOWER()` function converts a string to lowercase based on the rules of the database's locale.

Here's the syntax of the `LOWER()` function:

```sql
LOWER(text)
```

In this syntax, text is the input string that you want to convert. Its type can be `CHAR`, [`VARCHAR`](../postgresql-tutorial/postgresql-char-varchar-text), or `TEXT`.

The `LOWER()` function returns a new string with all letters converted to lowercase.

If the text is `NULL`, the `LOWER()` function returns `NULL`.

## PostgreSQL LOWER() function examples

Let's explore some examples of using the `LOWER()` function.

### 1) Basic PostgreSQL LOWER() function example

The following example uses the `LOWER()` function to convert the string PostgreSQL to lowercase:

```sql
SELECT LOWER('PostgreSQL');
```

Output:

```text
   lower
------------
 postgresql
(1 row)
```

### 2) Using PostgreSQL LOWER() function with table data

We'll use the `customer` table from the [sample database](../postgresql-getting-started/postgresql-sample-database):

![PostgreSQL LOWER() Function - Sample Table ](https://neon.com/postgresqltutorial/customer.png)The following example uses the `LOWER()` function to convert the first names of customers to lowercase:

```sql
SELECT
  LOWER(first_name)
FROM
  customer
ORDER BY
  first_name;
```

Output:

```text
    lower
-------------
 aaron
 adam
 adrian
 agnes
 alan
...
```

### 3) Using PostgreSQL LOWER() function in the WHERE clause

The following example uses the `LOWER()` function in the [`WHERE`](../postgresql-tutorial/postgresql-where) clause to find customers by last names, comparing them with the input string in lowercase:

```sql
SELECT
  first_name,
  last_name
FROM
  customer
WHERE
  LOWER(last_name) = 'barnett';
```

Output:

```text
 first_name | last_name
------------+-----------
 Carole     | Barnett
(1 row)
```

## Summary

- Use the `LOWER()` function to return a new string with all the characters of the input string converted to lowercase.

---

## Related docs (String Functions)

- [ASCII](https://neon.com/postgresql/postgresql-string-functions/postgresql-ascii)
- [CHR](https://neon.com/postgresql/postgresql-string-functions/postgresql-chr)
- [CONCAT](https://neon.com/postgresql/postgresql-string-functions/postgresql-concat-function)
- [CONCAT_WS](https://neon.com/postgresql/postgresql-string-functions/postgresql-concat_ws)
- [FORMAT](https://neon.com/postgresql/postgresql-string-functions/postgresql-format)
- [INITCAP](https://neon.com/postgresql/postgresql-string-functions/postgresql-initcap)
- [LEFT](https://neon.com/postgresql/postgresql-string-functions/postgresql-left)
- [LENGTH](https://neon.com/postgresql/postgresql-string-functions/postgresql-length-function)
- [LPAD](https://neon.com/postgresql/postgresql-string-functions/postgresql-lpad)
- [LTRIM](https://neon.com/postgresql/postgresql-string-functions/postgresql-ltrim)
- [MD5](https://neon.com/postgresql/postgresql-string-functions/postgresql-md5)
- [POSITION](https://neon.com/postgresql/postgresql-string-functions/postgresql-position)
- [REGEXP_MATCHES](https://neon.com/postgresql/postgresql-string-functions/postgresql-regexp_matches)
- [REGEXP_REPLACE](https://neon.com/postgresql/postgresql-string-functions/regexp_replace)
- [REPEAT](https://neon.com/postgresql/postgresql-string-functions/postgresql-repeat)
- [REVERSE](https://neon.com/postgresql/postgresql-string-functions/postgresql-reverse)
- [REPLACE](https://neon.com/postgresql/postgresql-string-functions/postgresql-replace)
- [RIGHT](https://neon.com/postgresql/postgresql-string-functions/postgresql-right)
- [RPAD](https://neon.com/postgresql/postgresql-string-functions/postgresql-rpad)
- [RTRIM](https://neon.com/postgresql/postgresql-string-functions/postgresql-rtrim)
- [SPLIT_PART](https://neon.com/postgresql/postgresql-string-functions/postgresql-split_part)
- [SUBSTRING](https://neon.com/postgresql/postgresql-string-functions/postgresql-substring)
- [TO_CHAR](https://neon.com/postgresql/postgresql-string-functions/postgresql-to_char)
- [TO_NUMBER](https://neon.com/postgresql/postgresql-string-functions/postgresql-to_number)
- [TRANSLATE](https://neon.com/postgresql/postgresql-string-functions/postgresql-translate)
- [TRIM](https://neon.com/postgresql/postgresql-string-functions/postgresql-trim-function)
- [UPPER](https://neon.com/postgresql/postgresql-string-functions/postgresql-upper)
