Why word-splitting is the actual hard part
Converting a list of words into a target case is trivial — join with an underscore, or capitalize each one. The genuinely hard part is figuring out where one word ends and the next begins when the input is already someCamelCaseThing or SCREAMING_SNAKE_CASE, and this tool spends most of its logic there, not on the joining.
Explicit separators — underscores, hyphens, dots, spaces — are the easy case. The harder one is an unbroken run like getHTTPStatusCode, where the boundary between "words" is a *change* in letter case, not a character you can split on directly.
The acronym problem
A naive rule — "insert a break before every uppercase letter" — mangles any acronym. Applied to HTMLParser, it produces H, T, M, L, Parser: five words instead of the two a person would actually recognize.
This tool instead treats a run of capital letters as one unit and only breaks it where a new word starts, which is one letter before the last capital in the run if a lowercase letter follows. HTMLParser correctly becomes HTML + Parser; getIDForUser becomes get + ID + For + User.
Acronyms get normalized, not preserved — on purpose
Converting XMLHttpRequest to PascalCase produces XmlHttpRequest, not XMLHttpRequest. This might look wrong at first glance, but it is deliberate and matches the behaviour of the naming-convention libraries most codebases already use, such as change-case and Lodash's camelCase/startCase.
The alternative — trying to detect and preserve "this was originally an acronym" — requires guessing, since by the time the words are separated there is no reliable signal left distinguishing an intentional acronym from a word that simply happened to be all-uppercase. Every case-conversion tool that claims to preserve acronym casing is making the same guess, just less visibly than admitting it here.
When each convention is actually used
camelCase and PascalCase dominate JavaScript, TypeScript, Java and C# — variables and functions in camelCase, classes and types in PascalCase. snake_case is the Python and Rust convention, and it is also what most SQL databases expect for column and table names. kebab-case is standard for URL slugs, HTML attributes and CSS custom properties, since neither underscores nor camelCase are valid in a hostname or CSS identifier without escaping. CONSTANT_CASE signals a constant or an environment variable in nearly every language that has one. dot.case shows up in configuration keys and some structured logging formats.