Guides › Text Case Styles Explained: camelCase, snake_case, Title Case and More

Text Case Styles Explained: camelCase, snake_case, Title Case and More

“Case” is how a piece of text is capitalised and joined. In everyday writing it decides how a headline looks; in programming it is a convention that makes names consistent and readable. Here is what each style means and where to use it.

Styles for writing

Styles for code and file names

Names in code cannot contain spaces, so words are joined in a consistent way:

Why consistency matters

Mixing styles makes code harder to read and causes bugs, because many systems treat userId and userid as different names. For web addresses, kebab-case is the safest choice: search engines read hyphens as word separators, while underscores can join words together.

Converting between styles

Changing a long list of names by hand is slow and error-prone. Paste text into the Case Converter and click the style you want. For the developer styles, it works out the words from spaces, punctuation and existing capital letters, so “User Account-ID”, userAccountId and user_account_id all become the same words in the new style. With one name per line, each line is converted on its own.

A few cases to watch

Try it now: use the free Case Converter — private, instant and runs in your browser. Open Case Converter →

More guides