Skip to main content
The tolower function converts all characters in a string to lowercase. Use this function to normalize text for case-insensitive comparisons, standardize log data, or prepare strings for consistent analysis.

For users of other query languages

If you come from other query languages, this section explains how to adjust your existing queries to achieve the same results in APL.
In Splunk SPL, you use the lower function. APL’s tolower provides the same functionality.
| eval lowercase=lower(field)
In ANSI SQL, you use LOWER for lowercase conversion. APL’s tolower provides the same functionality.
SELECT LOWER(field) AS lowercase FROM logs;

Usage

Syntax

tolower(value)

Parameters

NameTypeRequiredDescription
valuestringYesThe input string to convert to lowercase.

Returns

Returns the input string with all characters converted to lowercase.

Use case examples

  • Log analysis
  • OpenTelemetry traces
  • Security logs
Normalize HTTP methods for case-insensitive aggregation and analysis.Query
['sample-http-logs']
| extend normalized_method = tolower(method)
| summarize request_count = count() by normalized_method, status
| sort by request_count desc
| limit 10
Run in PlaygroundOutput
normalized_methodstatusrequest_count
get2005432
post2012341
get4041987
This query normalizes HTTP methods to lowercase, ensuring that ‘GET’, ‘Get’, and ‘get’ are all counted together for accurate request analysis.
  • toupper: Converts strings to uppercase. Use this for the opposite transformation.
  • totitle: Converts strings to title case. Use this for capitalized word formatting.
  • strcmp: Compares strings. Use tolower before strcmp for case-insensitive comparisons.
  • replace_string: Replaces strings. Use tolower to normalize before replacements.