Skip to content
ToolkitHub

Case Converter

Convert text case (upper, lower, camel, snake, etc.)

Guide

Naming conventions and text case styles

By Logappradeep · ServiceNow developer

Letter case carries meaning in both writing and code. Headlines use title case, sentences use sentence case, and programming languages each have conventions for naming variables, constants, files, and URLs. A case converter rewrites text into a chosen style in one click, saving tedious retyping and avoiding typos when renaming many identifiers.

The styles and where they belong

  • UPPERCASE: acronyms, emphasis in plain-text channels, and, with underscores, constants such as MAX_RETRIES.
  • lowercase: email addresses, domain names, tags, and normalizing text before comparison.
  • Title Case: headings, product names, and button labels in many style guides.
  • Sentence case: body text, UI messages, and headings in style guides that prefer it, such as many design systems.
  • camelCase: variables and functions in JavaScript, TypeScript, Java, and JSON keys in many APIs, for example firstName.
  • snake_case: Python variables and functions, Ruby, database column names, and many REST APIs, for example first_name.
  • kebab-case: URLs, CSS class names, file names, HTML attributes, and command-line flags, for example first-name.

How each conversion behaves

Knowing the exact rules prevents surprises:

  • camelCase lowercases the first letter, capitalizes the start of each following word, and removes the spaces: user account id becomes userAccountId.
  • snake_case and kebab-case lowercase everything and replace runs of whitespace with _ or -. They split on spaces, so an existing identifier like userAccountId becomes useraccountid. Put spaces between the words first when converting from camelCase.
  • Title Case capitalizes the first letter of every word and leaves the remaining letters untouched, so acronyms like API survive.
  • Sentence case capitalizes only the very first character of the whole text and lowercases the rest. Proper nouns and acronyms, such as London or NASA, need to be fixed by hand afterward.

Gotchas

  • Style guides disagree on title case. AP, Chicago, and APA styles lowercase short words such as "a", "of", and "the" in certain positions. A mechanical converter capitalizes every word, so review headlines before publishing.
  • Some languages have special case rules. Turkish distinguishes dotted and dotless i, and German ß uppercases to SS. Generic conversion follows default Unicode rules, which may not match local conventions.
  • Case-sensitive systems. Renaming Readme.md to README.md can confuse Git on case-insensitive file systems such as the macOS and Windows defaults. Use git mv for case-only renames.
  • PascalCase is different from camelCase. Class and component names usually start with a capital, as in UserAccount; capitalize the first letter of the camelCase result if you need it.

The conversion happens in your browser, directly in the text box, so nothing you paste is uploaded.

Frequently asked questions

How do I convert camelCase to snake_case?

Insert spaces between the words first (userAccountId to user Account Id), then click snake_case. The converter splits words on whitespace.

Does Title Case follow AP or Chicago style?

No. It capitalizes the first letter of every word. Lowercase short words such as "of" or "the" by hand if your style guide requires it.

Why did Sentence case lowercase my proper nouns?

Sentence case lowercases everything after the first character. Restore capitals for names and acronyms after converting.

Which case should I use for URLs?

kebab-case is the usual choice for URL paths because hyphens are treated as word separators and are easy to read.