ModelWorks logoModelWorks
JSON TransformString

toLowerCase

Convert a string to lowercase

toLowerCase

Converts every character of a string to lowercase.

Options

This operation takes no options; pass an empty object or omit options entirely.

Example

Input

JSON
"Hello World"

Operation

JSON
{ "type": "toLowerCase" }

Output

JSON
"hello world"

In a Circuit Step

JSON
{
  "name": "normalize_email",
  "description": "Lowercase the email address before lookup",
  "function": "circuit.core.transform.json",
  "input": {
    "source": "${{ input.email }}",
    "operations": [
      { "type": "toLowerCase" }
    ]
  },
  "outputs": [
    {
      "name": "normalized_email",
      "description": "Email address normalized to lowercase",
      "value": "${{ normalize_email.output.transformed_result }}"
    }
  ]
}

Notes & gotchas

  • Errors with toLowerCase: expected string if the input is not a string.
  • Uses Rust's Unicode-aware to_lowercase, which can change byte length (e.g., German ßss). Don't assume the output is the same length as the input.
  • Use toUpperCase for the inverse.
On this page

On this page