Programming Case Converter

Converts phrases or identifiers into programming naming styles such as snake_case, kebab-case, CONSTANT_CASE, dot.case and Train-Case. It is useful for renaming variables, file names, URLs and settings so they follow the style your project uses.

Up to 1 MiB.

Options

How to use the Programming Case Converter

  1. Enter one phrase or identifier per line.
  2. Keep All styles, labelled to see snake_case, kebab-case, CONSTANT_CASE, dot.case and Train-Case together, or choose one style to get just that output.

Rules applied

  • Words are split at spaces, punctuation, underscores, hyphens and camelCase or acronym boundaries.
  • Apostrophes are removed and each line is converted separately.
  • camelCase and PascalCase have their own tools: camelCase Converter and PascalCase Converter.

Limitations

  • Accented and non-Latin letters are kept as they are.

Worked examples

One phrase in every style

Input

Max Retry Count

Result

snake_case
max_retry_count

kebab-case
max-retry-count

CONSTANT_CASE
MAX_RETRY_COUNT

dot.case
max.retry.count

Train-Case
Max-Retry-Count
Several identifiers as kebab-case

Input

userProfileCard
Order Line Item

Result

user-profile-card
order-line-item

Practical uses

  • Naming variables across languages

    A developer has a phrase and needs it in several styles. They paste it and keep the option that shows all styles, labelled. They get snake_case for Python, kebab-case for CSS and CONSTANT_CASE for a setting at the same time.

  • Converting database column names

    An analyst has a list of headings that will become columns in a new table. They paste one heading per line and choose snake_case. Each line is converted separately, giving clean column names.

  • Making URL-friendly slugs

    A web editor wants page titles to become slugs. They paste the titles and choose kebab-case. The words are joined with hyphens in lowercase, so the slugs are ready for a site structure.

Privacy: this tool runs entirely in your browser. Your text is not uploaded, logged or saved, and it is never sent to analytics. Maximum input: 1 MiB.