camelCase, snake_case and kebab-case: A Field Guide to Naming Conventions
Which naming convention belongs where across languages, URLs and APIs; case conversion pitfalls with acronyms; and why consistency beats preference.
Naming conventions look like taste until they cross a boundary: a Python service talking to a JavaScript front end, a JSON field meeting a URL, a database column meeting a TypeScript type. Each ecosystem has a default — knowing the map prevents most of the friction.
Where each style lives
- camelCase — JavaScript, TypeScript, Java and Swift variables; JSON API fields.
- snake_case — Python, Ruby, Rust and SQL columns; the usual database-to-API style.
- kebab-case — URLs, HTML attributes, CSS classes and file names, because the hyphen is safe everywhere.
- PascalCase — types, classes and component names.
- CONSTANT_CASE — environment variables and compile-time constants.
The acronyms minefield
HTTPServer, HttpServer and httpServer are all legal camelCase readings. Pick one rule — consecutive capitals count as one word — and apply it mechanically. The Case Converter implements that rule across eleven styles, so batch renames stay consistent instead of drifting file by file.
Serializing across the boundary
Databases emit snake_case; JavaScript clients want camelCase. Modern serializers convert automatically. When yours does not, convert field lists in bulk with the converter before wiring types, and generate the matching interfaces from a sample payload with the JSON to TypeScript tool.
URLs deserve their own rules
Lowercase kebab URLs avoid case-sensitivity bugs across servers and CDNs. After restructuring paths, check routing rules against real address structure with the URL Parser — path case bugs hide until a cached link meets a case-sensitive route.
The rule underneath all of it: consistency within a layer, explicit conversion between layers. Convention is a contract, and the tools above keep that contract auditable.
Related guides
Testing Regular Expressions Safely in Your Browser
A practical regex testing workflow: flags, capture groups and lookarounds visualized, catastrophic backtracking awareness, and why browser testers protect your patterns.
Read guide →2026-10-03URL Encoding, Percent-Encoding and Query Strings: What Actually Matters
When spaces become %20 or +, the difference between encodeURI and encodeURIComponent, double-encoding bugs and how to debug URLs component by component.
Read guide →2026-09-23What a Good Markdown Previewer Renders (GitHub Flavor Included)
Markdown features worth checking in a previewer: tables, task lists, code fences, sanitization behavior and why raw HTML needs care.
Read guide →Try these tools
Case Converter
Convert text to UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case or CONSTANT_CASE in one glance, each with its own copy button.
Open tool →JSON to TypeScript
Paste JSON and get ready-to-use TypeScript interfaces: nested objects become interfaces, arrays infer element types, keys are PascalCased, invalid keys quoted. Instant and offline.
Open tool →URL Parser
Paste any URL and see protocol, host, port, path, hash and every query parameter in a clean table. Relative URLs are resolved against a configurable base. Nothing is sent anywhere.
Open tool →