Back to KB
Difficulty
Intermediate
Read Time
3 min

7 Things Wrong With Most Online Case Converters (And What to Use Instead)

By Codcompass TeamΒ·Β·3 min read

Most free case converter tools share the same 3 fatal flaws. Here is what they are and how to fix them in your own implementation.

Flaw 1: Proper Case β‰  Title Case

Every basic case converter uses CSS text-transform: capitalize logic β€” which capitalizes the first letter of EVERY word. That is Proper Case. True Title Case skips prepositions.

// WRONG β€” capitalizes everything (Proper Case)
const properCase = str => str.replace(/\b\w/g, c => c.toUpperCase());
// "How To Write A Blog Post For The Web" ❌

// RIGHT β€” true Title Case with small word exceptions
const SMALL_WORDS = new Set(['a','an','the','and','but','or','for','nor','on','at','to','by','in',

πŸŽ‰ Mid-Year Sale β€” Unlock Full Article

Base plan from just $4.99/mo or $49/yr

Sign in to read the full article and unlock all 635+ tutorials.

Sign In / Register β€” Start Free Trial

7-day free trial Β· Cancel anytime Β· 30-day money-back