Skip to content

Case Convert

Convert a string between common casing conventions — camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, and Sentence case.

FieldTypeRequiredDescription
inputstringYesString to convert
tostringYescamel, pascal, snake, kebab, constant, title, sentence
FieldTypeDescription
outputstringConverted string
fromstringDetected source case
tostringTarget case
Terminal window
curl -X POST https://morso.dev/api/case \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input": "hello_world_test", "to": "camel"}'
{
"output": "helloWorldTest",
"from": "snake",
"to": "camel"
}
Terminal window
curl -X POST https://morso.dev/api/case \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input": "helloWorldTest", "to": "kebab"}'
{
"output": "hello-world-test",
"from": "camel",
"to": "kebab"
}
Terminal window
curl -X POST https://morso.dev/api/case \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input": "myVariableName", "to": "constant"}'
{
"output": "MY_VARIABLE_NAME",
"from": "camel",
"to": "constant"
}