U
UseCalcForge Free Online Calculators
Developer Tools

Text Case Converter.

Convert text between eight common case styles, including camelCase, snake_case, and kebab-case.

Runs entirely in your browser. The values you enter never leave your device — there is no request to our server and nothing is stored. How we handle data

Which Case Style for Which Job

Programming languages and platforms each settled on their own naming convention, largely for historical reasons rather than technical necessity, and mixing conventions within one codebase is one of the more common style inconsistencies a linter flags.

Common Conventions

JavaScript/Java variables: camelCase
Classes (most languages): PascalCase
Python variables/functions: snake_case
URL slugs, CSS classes: kebab-case
Environment variables, constants: CONSTANT_CASE

These are conventions enforced by team style guides and linters, not language syntax — JavaScript will run a snake_case variable name without complaint. Following the convention matters for readability and for tooling that expects it, not because the alternative is invalid.

How Words Are Detected

Converting between case styles requires first breaking the text back into individual words, regardless of how those words were originally joined.

Spaces split naturally

Plain text with spaces is the simplest case — each space-separated token becomes one word, ready to be rejoined in any target style.

camelCase and PascalCase split on capital letters

Pasting in firstName or UserAccount, the converter detects the lowercase-to-uppercase boundary and splits there, recovering "first name" or "user account" before converting to the target style.

snake_case and kebab-case split on the separator

Underscores and hyphens are treated as word boundaries and removed, so user_account_id or user-account-id both recover to "user account id" before conversion.

Where Automated Conversion Gets It Wrong

Acronyms are the main source of ambiguity. Converting "userID" to snake_case can reasonably produce either user_id or user_i_d, depending on whether the tool treats "ID" as one unit or two capital letters. Most conventions favour the former, but automated detection cannot always tell an acronym from two adjacent short words.

Similarly, numbers embedded in an identifier — user2Name — can split inconsistently depending on the tool. When precision matters, particularly for a database migration or bulk rename, spot-check a sample of the converted output before applying it wholesale.

Knowledge Base

Text Case Conventions Methodology.

Every naming convention in programming solves the same underlying problem — most languages do not allow spaces inside an identifier — using a different visual marker to separate words. Converting between them is mechanical once the original word boundaries are recovered correctly.

The Calculation Branch

camelCase: firstWord lowercase, subsequent words capitalized, no separator | PascalCase: every word capitalized, no separator | snake_case: lowercase, underscore separator | kebab-case: lowercase, hyphen separator | CONSTANT_CASE: uppercase, underscore separator | Title Case: major words capitalized, minor words lowercase

Industrial Standards.

Word boundaries are recovered three ways at once: splitting on whitespace, splitting on underscore or hyphen runs, and splitting at a lowercase-to-uppercase letter transition (to reverse camelCase and PascalCase). The recovered words are lowercased and then rejoined according to the target style's own capitalization and separator rule. Title case applies a fixed minor-word list (articles, short conjunctions, short prepositions) that is lowercased unless it opens or closes the title, following the convention most style guides share even where they differ on the exact word list.

In-Depth Analysis & Reference Data

kebab-case takes its name from the visual resemblance of hyphen-separated words to pieces on a skewer — a piece of programmer slang that stuck well enough to become the standard term. It dominates URLs specifically because underscores are visually easy to miss (some browsers and fonts render them as barely visible, especially when underlined) and because search engines have historically treated a hyphen as a word separator while treating an underscore as part of the word.

CONSTANT_CASE, sometimes called SCREAMING_SNAKE_CASE, marks a value as a constant by convention in many languages that have no dedicated constant syntax of their own, making the naming convention do work the type system does not.

Registry Questions & FAQ.

Does this tool work on multi-line text or code blocks?

It works on the text as a whole, treating the full input as one identifier or phrase to convert. For converting many separate identifiers within a code file, a find-and-replace or a dedicated refactoring tool in your editor is a better fit than pasting the whole file here.

Which case should I use for a URL slug?

kebab-case is the near-universal standard for URL slugs, used by virtually every major platform and CMS, and is what this site's own URLs use throughout.

All metrics verified against ISO/ASTM benchmarks.