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 ' , ' of ' ]); const titleCase = str => str . toLowerCase (). split ( ' ' ). map (( word , i ) => i === 0 || ! SMALL_WORDS . has ( word ) ? word [ 0 ]. toUpperCase () + word . slice ( 1 ) : word ).…