Skip to content
ConvertMyStuff
Resource

Case Conversion Conventions

camelCase, PascalCase, snake_case, and kebab-case naming conventions organize identifiers in code, URLs, and data fields.

Text ToolsRelated tool: Camel Case Converter

Quick answer

camelCaseCapitalizesWordsAfterFirst (myVariableName). PascalCase capitalizes each word (MyClassName). snake_case uses underscores (my_variable_name). kebab-case uses hyphens (my-variable-name), common in URLs. CONSCREAMING_SNAKE often denotes constants. Convert consistently per language and API style guide.

Use the tool

Convert or calculate with our free camel case converter.

Overview

Case conventions signal context in codebases and integrations: JavaScript prefers camelCase properties, Python snake_case, CSS and URLs kebab-case, C# types PascalCase. Converting exported CSV headers from 'First Name' to firstName or first_name prevents brittle import scripts. Automatic case converters split on spaces, underscores, or hyphens and rejoin per target pattern—human review still needed for acronyms like XMLHttpRequest or userID vs userId team preferences. SEO URLs traditionally lowercase kebab-case; mixed case paths may break on case-sensitive servers.

Major naming conventions overview

camelCase: JavaScript, Java fields, JSON APIs often camelCase. PascalCase: class names, React components, .NET types. snake_case: Python, Ruby variables, Postgres column names often lowercase snake.

kebab-case: URL slugs, HTML attributes, CSS classes. SCREAMING_SNAKE_CASE: environment constants and enum-like macros in some codebases.

Handling acronyms and edge cases

HTMLParser vs HtmlParser vs htmlParser—teams document acronym rules. Converters naive-split on caps may mishandle iOS or AWS—post-edit after auto conversion.

Numbers and unicode: case conversion affects letters only; normalize unicode compatibility before converting Turkish dotted capital I edge cases.

API and database field mapping

ORMs map snake_case DB columns to camelCase JSON automatically in frameworks—manual ETL must convert when crossing boundaries. GraphQL often camelCase fields regardless of SQL backend.

Bulk convert spreadsheet headers before JSON import to prevent mixed-case keys breaking client code expecting strict convention.

URLs, slugs, and SEO

Lowercase kebab-case slugs avoid duplicate content on case-insensitive hosts and improve readability. Convert title case headlines to slugs stripping stop words per editorial policy.

File names on case-sensitive Linux servers break links when marketing uses wrong case—standardize slug generator output.

Safe conversion workflow

Identify target convention from style guide before batch converting legacy exports. Preview sample rows for acronym collisions. Version control before mass rename refactors in code.

Pair case conversion with trim and dedupe on identifier lists imported from messy human-entered spreadsheets.

Examples

  • CSV header to JSON keys

    'Order ID' → orderId (camelCase) or order_id (snake_case) depending on API schema.

  • Blog title to slug

    'Case Conversion Conventions' → case-conversion-conventions kebab slug for URL.

Common mistakes and edge cases

  • Mixing conventions within same API surface.
  • Auto-converting acronyms without team acronym table.
  • Uppercase URLs on case-sensitive CDNs breaking assets.
  • Converting display names meant for humans into code identifiers without review.

Related resources

Related tools

Last reviewed: 2026-05-23