Converts a string into snakecase format by replacing spaces, dashes, and other non-word characters with underscores (_). Use it when you need consistent identifiers, especially for systems that prefer underscore naming conventions.
-
Convert a product label to snakecase
{{snakecase record.product.label}}Input:
{ "record": { "product": { "label": "a-b-c d_e" } } }Output:
a_b_c_d_e
-
Convert descriptive text
{{snakecase record.category}}Input:
{ "record": { "category": "New Product Launch 2025" } }Output:
new_product_launch_2025
-
Convert camelCase (and other case splitting)
{{snakecase record.userAction}}Input:
{ "record": { "userAction": "getUserProfile" } }Output:
Get_user_profile
Tip
-
All separators are normalized into a single underscore.
-
Useful for generating consistent keys, database field names, or API parameters.
-
Consecutive non-word characters collapse into a single underscore.
-
Output is lowercase and splits camelcase/pascalcase at capital letter boundaries.
-
Digits are preserved; underscores are not inserted between letters and adjacent digits unless a separator exists.
-
Non-string datatype inputs (like numbers or boolean) are converted to strings before processing. Arrays of primitive types (like strings or numbers) are converted into a comma-separated string before processing. If inputs are objects or object arrays, the output will be unusable.