Why naming convention matters
Programming languages, file systems, URL schemes, and protocols each have conventions for how multi-word identifiers should look. Mix them up and your code is harder to read; pick the wrong one for a context and you get bugs. JavaScript convention is camelCase. Python is snake_case. URLs prefer kebab-case. SQL columns are often snake_case. Constants in any language tend to be CONSTANT_CASE.
The cases this tool produces
camelCase— lower start, capitals at word boundaries. JavaScript variables, Java fields, JSON keys in JavaScript-derived APIs.PascalCase— capital start, capitals at boundaries. Class names in most OO languages, React components, Type names in TypeScript.snake_case— all lower, words separated by underscores. Python variables, Ruby variables, Rust types, SQL column names, environment variables (mostly).SCREAMING_SNAKE_CASE— all upper, words separated by underscores. Constants in nearly every language, environment variables (the convention).kebab-case— all lower, words separated by hyphens. URLs, HTML attributes, CSS class names, npm package names, command-line flags.SCREAMING-KEBAB-CASE— all upper, hyphens. Rarely used; sometimes seen in HTTP headers (though headers are case-insensitive).dot.case— words separated by dots. Java/JS package names, configuration keys, file extensions sometimes.Title Case/Sentence case— for human-readable text. Title case capitalizes every word; sentence case only the first.
How the conversion works
The tool first tokenizes your input into individual words, then reformats them. Tokenization handles all common boundaries:
"helloWorld" → ["hello", "world"] "HelloWorld" → ["hello", "world"] "hello_world" → ["hello", "world"] "hello-world" → ["hello", "world"] "hello world" → ["hello", "world"] "HTTPSConnection" → ["https", "connection"] // detects acronyms "v1ApiHandler" → ["v1", "api", "handler"] // digits as boundary
That last case is the tricky one. HTTPSConnection is conventionally parsed as [HTTPS, Connection] (treating the acronym as one word) rather than [H, T, T, P, S, Connection]. Most well-written tokenizers detect runs of consecutive uppercase as acronyms.
Batch conversion
Paste multiple identifiers (one per line, or comma-separated) and the tool converts each separately. Useful when refactoring: paste a list of variable names, copy out the converted batch.
Common use cases
- Refactor variable names from one convention to another
- Generate URL slugs from product names
- Convert SQL column names to JavaScript property names
- Bulk-rename a list of identifiers when migrating codebases
Frequently asked questions
Why does it split HTTPSConnection into "https connection"?
A run of consecutive uppercase letters followed by a lowercase letter is treated as an acronym. This is the standard convention — <code>XMLHttpRequest</code> tokenizes as [xml, http, request], not [x, m, l, http, request]. It produces sensible PascalCase / snake_case output.
What case should I use for JavaScript variables?
camelCase for local variables, parameters, and properties. PascalCase for classes and constructors. SCREAMING_SNAKE_CASE for constants (especially module-level configuration). kebab-case for filenames and CSS classes. This matches the ecosystem convention.
And in Python?
snake_case for variables, functions, and module names. PascalCase for classes. SCREAMING_SNAKE_CASE for constants. The Python style guide (PEP 8) is very explicit about this.
Why do URL slugs use kebab-case?
Hyphens are word separators that don't need URL-encoding. Underscores ARE URL-safe but Google's ranking systems historically treated them as part of a word, not a separator — so <code>blue-shoes</code> and <code>blue_shoes</code> ranked differently for "blue shoes" searches. Hyphens won.