Which case convention should you use?
- camelCase — JavaScript variables and functions, JSON keys.
- PascalCase — class names in most programming languages.
- snake_case — Python variables, database column names, file names.
- kebab-case — URLs, CSS class names, HTML attributes.
- SCREAMING_SNAKE_CASE — constants and environment variables.
Title Case and everyday writing
Not every case convention is for code. Title Case (Capitalizing Most Major Words) is standard for headlines and titles, though house styles vary on which short words — "a," "the," "of" — stay lowercase. Sentence case, where only the first word and proper nouns are capitalized, is the more common choice for body text, UI labels, and most modern style guides that favor a less formal look.
Why consistency matters
Mixing conventions within the same codebase or document is a common source of small bugs and review friction — a variable named userName in one file and user_name in another does the same job but forces anyone reading both to context-switch. Picking one convention per context (language, file type, or document) and sticking to it matters more than which specific convention gets chosen.
The gotcha when your language and database disagree
Database column names are almost universally snake_case, regardless of what language is querying them — even a JavaScript or Java app that uses camelCase everywhere else typically still talks to snake_case columns. This is why many backend frameworks quietly convert between the two at the data layer. If you're writing that mapping by hand, converting a batch of column or field names between the two cases is exactly what this tool is for.
Why kebab-case specifically matters for URLs
Google explicitly recommends hyphens over underscores in URL slugs, and the reason is more concrete than a style preference: Google's crawler treats a hyphen as a word separator but reads an underscore as a joiner, so seo-best-practices is parsed as three separate words while seo_best_practices can be read as one long, meaningless string. If a URL, filename, or slug is meant to be read as separate words by a search engine, kebab-case isn't just convention — it's the format that actually gets interpreted correctly.
Where SCREAMING_SNAKE_CASE actually belongs
Reserve all-caps with underscores for values that never change at runtime — environment variables, configuration constants, enum-style values. Seeing MAX_RETRY_COUNT or API_BASE_URL signals to anyone reading the code that this is a fixed setting, not a value that changes as the program runs, the same way userName or retryCount would. Using the visual weight of a naming convention to signal something real about the value (constant vs. variable, in this case) is the actual point of having multiple conventions at all, not just picking one arbitrarily — it's information a reader gets for free, without needing to check the declaration.