Case Detector

Identify which naming convention a string follows, and see it converted to every other convention at once.

camelCaseConvention
1Lines

Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.

What the Case Detector does

The case detector on this page will identify which naming convention a string follows, and see it converted to every other convention at once. Paste your text in, pick the options you need, and copy the result straight back out. It is most often used for mapping identifiers across a language boundary. We run a second free tools site as well — FreeToolsWorld.org.

How to use it

  1. Paste the identifier, or several one per line.
  2. Read which convention was detected.
  3. Copy whichever converted form you need.

How it works

Detection works from the pattern of separators and capitalisation, and some strings are genuinely ambiguous. A single lowercase word with no separators is valid camelCase, valid snake_case and valid lowercase all at once, so the detector reports the simplest match.

The useful part is the conversion table underneath. Crossing a language boundary — a Python API consumed by JavaScript, a SQL schema mapped to a TypeScript interface — means converting identifiers in bulk, and seeing all six forms at once makes the mapping obvious.

Acronym handling is where automated conversion disagrees with itself. HTTPResponse round-tripped through snake_case and back can come out as HttpResponse, which is a different identifier. Check the results of a bulk rename rather than trusting it.

When to use it

  • Mapping identifiers across a language boundary.
  • Auditing a codebase for mixed naming conventions.
  • Converting a batch of field names for an API.
  • Checking what convention a third-party library uses.

Common mistakes to avoid

  • Trusting detection on a single lowercase word, which is ambiguous by nature.
  • Bulk-renaming through a conversion without checking acronyms.
  • Assuming a round trip returns the original. For identifiers with acronyms it often does not.

Frequently asked questions

How does case detection work?

From the separators and the capitalisation pattern. Underscores suggest snake_case, hyphens kebab-case, internal capitals camel or Pascal.

Why is a single lowercase word ambiguous?

Because "name" is valid camelCase, valid snake_case and valid lowercase simultaneously. The detector reports the simplest match.

Do conversions round-trip?

Usually, but not for identifiers containing acronyms. HTTPResponse through snake_case and back can become HttpResponse, which is a different name.

Related tools

See all text & writing tools →