Text

Case to HeaderCase

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

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

Free Online HeaderCase Converter

Our string formatting tool instantly transforms your normal text, sentences, or code variables into HeaderCase. 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 HeaderCase format with the best possible settings.

3. Copy HeaderCase

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

Frequently Asked Questions

Conversion Specs

InputCase
OutputHeaderCase
SafetyHTTPS / Auto-delete
Price
Free

Using code

headerCase

Converts a given string into Header-Case (also known as Train-Case), where each word is capitalized and separated by hyphens. The function handles various input formats including camelCase, snake_case, and strings with arbitrary delimiters by first splitting the text into individual words, capitalizing the first letter of each word, lowercasing the rest, and then joining them with hyphens.

Parameters

NameTypeDescription
textstringThe text to convert.

Returns

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

headerCase('hello world');
// => Hello-World

headerCase('camelCaseString');
// => Camel-Case-String

headerCase('session_id');
// => Session-Id