Text

Case to ConstantCase

Free and instant online tool to convert normal text, strings, or variables into ConstantCase.

Input Text
constant-case Result
100% Secure
Fast Conversion
High Accuracy

Free Online ConstantCase Converter

Our string formatting tool instantly transforms your normal text, sentences, or code variables into ConstantCase. Simply paste your content, and the tool will automatically handle spaces and capitalization.

How to convert

1. Paste Case text

Paste or type your Case content into the input area.

2. Conversion Process

Our tool automatically converts your text to ConstantCase format with the best possible settings.

3. Copy ConstantCase

The conversion is complete. You can now copy the result directly to your clipboard.

Frequently Asked Questions

Conversion Specs

InputCase
OutputConstantCase
SafetyHTTPS / Auto-delete
Price
Free

Using code

constantCase

Converts a given string from any common casing convention (camelCase, kebab-case, snake_case, space-separated, etc.) to CONSTANT_CASE (also known as macro case or screaming snake case), where all letters are uppercased and words are separated by underscores.

Parameters

NameTypeDescription
textstringThe text to convert.

Returns

stringThe constant cased string.
npm i @razomy/string-case
import {constantCase} from '@razomy/string-case';

constantCase('hello world');
// => HELLO_WORLD

constantCase('camelCaseString');
// => CAMEL_CASE_STRING

constantCase('kebab-case-test');
// => KEBAB_CASE_TEST