Uppercase/Lowercase Converter: Sentence, Title, Snake & Kebab Case

PublishedToolSentence Case & Title Case Converter

Contents
  1. Rules by Case Style
  2. How the Sentence Case Regex Works
  3. Common Sticking Points
  4. Takeaways
  5. Frequently Asked Questions

When you write the title of a presentation slide or name a variable in JavaScript or Python, you often need to switch text you already wrote to a different capitalization rule.

Summary ① Sentence Case capitalizes only the letters that follow sentence punctuation (. ! ?) and normalizes everything else to lowercase. ② Title Case capitalizes the first letter of each word, with exceptions for short words like articles and prepositions. ③ snake_case and kebab-case split words at the uppercase boundaries of camelCase, then rejoin them with _ or -.

Rules by Case Style

English text capitalization styles vary depending on where they're used.

  • Sentence Case (capitalize only the first letter of the sentence): Capitalize the first letter of the sentence and normalize all remaining letters to lowercase.
    • Example: "hello, world! this is regex." → "Hello, world! This is regex."
  • Title Case (capitalize the first letter of each word): Capitalize the first letter of each word, but many style guides also leave short words like articles, prepositions, and conjunctions lowercase for readability.
    • Example: "the lord of the rings" → "The Lord of the Rings"
  • Snake Case (joined with underscores _): Common in database column names and variable names. All letters are lowercased and word boundaries are joined with underscores (_).
    • Example: "camelCaseConverter" → "camel_case_converter"
  • Kebab Case (joined with hyphens -): Widely used in web page URL slugs and CSS class names. Words are joined with hyphens (-).
    • Example: "KebabCaseStyle" → "kebab-case-style"

How the Sentence Case Regex Works

A regex replacement that finds the start of each sentence in a paragraph with multiple sentences and capitalizes only the first letter works like this.

  1. Detect sentence-ending punctuation: A period (.), question mark (?), or exclamation point (!) followed by a space marks a sentence boundary.
  2. Replace with a capitalized first letter:
    function toSentenceCase(text, forceLowerOthers = true) {
      const workingText = forceLowerOthers ? text.toLowerCase() : text;
      return workingText.replace(/(^\s*|[.!?]\s+)([A-Za-z가-힣])/g, (match, separator, letter) => {
        return separator + letter.toUpperCase();
      });
    }
    The regular expression /(^\s*|[.!?]\s+)([A-Za-z가-힣])/g finds the letter at the very start of the string (^) or after punctuation and whitespace ([.!?]\s+) and capitalizes only that letter. You can toggle whether the remaining letters are forced to lowercase with an option.

You can copy this regex into a text editor or console and run it yourself, but if you want to compare multiple sentences while switching options, you have to edit the code every time — which gets tedious.

Check it with our tool. Paste your text into the Sentence Case & Title Case Converter, pick Sentence case, Title case, Snake case, or Kebab case, and you'll see the result right away.

Sentence Case & Title Case Converter

Paste the English text you want to reformat into the input box, then switch it to Sentence Case or a programming variable format in one second.

The tool screen has a text input field, four conversion mode buttons (Sentence case, Title case, Snake case, Kebab case), a checkbox for options in each mode, and a result pane. Switching modes recalculates the same input immediately, and you can grab the result with the copy button.

Common Sticking Points

SituationResult
A sentence mixing Korean and EnglishSentence Case works by capitalizing the letter after punctuation, so Korean — which has no uppercase or lowercase — stays as is and only the English parts change
Converting camelCase to snake_case or kebab-caseWords are split at uppercase letters that follow a lowercase letter or digit, then joined in lowercase (e.g. "camelCaseConverter" → "camel_case_converter")
Wanting every word capitalized in Title CaseTurn on the "Capitalize every word" option and everything is capitalized with no exceptions for articles or prepositions

Takeaways

  • Sentence Case is a rule that capitalizes only the first letter after punctuation; whether the rest is normalized to lowercase is up to you.
  • Title Case capitalizes the first letter of each word, and you can choose whether to make exceptions for short words like articles and prepositions.
  • snake_case and kebab-case split words at camelCase's uppercase boundaries and differ only in the joiner they use.
  • Instead of porting the rules into code and comparing multiple texts, you can paste into the converter and just switch modes to check.
Sentence Case & Title Case Converter

Paste the English text you want to reformat into the input box, then switch it to Sentence Case or a programming variable format in one second.

Frequently Asked Questions

Why do snake_case and kebab-case give different results?

The way words are split is the same (uppercase boundaries, spaces, special characters). The only difference is the character that joins them. snake_case uses underscores (_) and kebab-case uses hyphens (-).

Can I use Sentence Case on Korean sentences?

The logic itself — capitalizing the letter after punctuation — applies to Korean too, but Korean has no uppercase or lowercase letters, so nothing actually changes. In sentences that mix in English, it only affects the English parts.

This article was adapted from our Korean original. Read the Korean original

Related articles

  1. URL Slug Generator Rules: Lowercase, Hyphens, Clean SlugsSee the exact rules and regex that turn a title into a clean lowercase hyphen slug, and compare results with and without Korean characters kept.
  2. Smart Quotes Cleaner: Convert Curly Quotes to ASCIIWord and messenger editors turn straight quotes into curly ones, which breaks code. Here's why it happens and how to convert them back to plain ASCII.
  3. Browser Mic Dictation: Why It Works in Chrome but Not FirefoxUse the Web Speech API to dictate mic audio into text in your browser with no install, see which browsers support it, and learn why Firefox can't.
  4. Split Text Into Sentences: Punctuation Rules and Line BreaksHow sentence splitting works: split on . ? ! and …, skip decimals and common abbreviations like Dr. and e.g., and format the output as lines or lists.
  5. SQL DDL to JSON Schema: Type Mapping and Parsing RulesHow SQL types map to JSON Schema Draft-07, how NOT NULL and PRIMARY KEY become required, and which constraints you must add by hand.
  6. SQL Formatter Rules: How Your One-Line Query Gets SortedSee exactly how a SQL formatter rewrites your query: which keywords get uppercased, where lines break, what gets indented, and why the results stay the same.

Related tools