dot.case Converter

Convert any text to dot.case — lowercase with periods between words. The convention for translation keys and configuration namespaces.

Input
Output

What is dot.case?

dot.case writes identifiers in lowercase with periods between words. It's an unusual convention because the period is reserved as a member-access operator in most programming languages — you can't write const user.name = "Alice" in JavaScript without it being parsed as property assignment. As a result, dot.case lives almost entirely in string contexts: configuration keys, translation files, logger names, structured logging fields, and similar places where the identifier exists as text rather than as a program variable.

What makes dot.case interesting is that the separator usually carries semantic meaning beyond word separation. In auth.login.button, the periods don't just separate three words — they represent a hierarchical path through a translation tree, where auth contains login which contains button. The flat string maps onto a nested structure, and the dot is how the mapping is encoded.

This hierarchical reading is why dot.case is the dominant convention for i18n keys, Spring Boot configuration properties, log4j logger names, and similar contexts. Tools that consume these keys parse the dots to navigate nested data structures. A snake_case key like auth_login_button would be flat; the dotted form preserves intent.

When to use dot.case

  • Internationalization (i18n) translation keys. Every major i18n library — i18next, formatjs, Vue i18n, react-intl — uses dotted keys to address translations. auth.login.button, errors.network.timeout, home.hero.subtitle.
  • Spring Boot and Java configuration properties. spring.datasource.url, logging.level.root, server.port. The dots map directly to nested YAML or properties files.
  • Java package names. com.example.app.services. Reversed-domain notation makes package ownership unambiguous.
  • Python module paths. os.path, urllib.request.urlopen. The dots represent the package hierarchy and map to directory structure on disk.
  • Structured logging field names. http.request.method, user.session.id. ELK stack, Datadog, and most APM tools expect dotted field names for nested context.
  • MongoDB nested field paths. Documents in MongoDB are addressed using dotted notation: db.users.find({"address.city": "Tokyo"}).
  • JSON path expressions. Libraries like JSONPath, jq (with the leading .), and lodash's _.get() all use dotted paths to address nested data.
  • Feature flag keys. Many feature-flag systems organize flags hierarchically: checkout.payment.stripe_enabled, experimental.new_dashboard.

How dot.case conversion works

  1. Tokenize the input. "User Profile Name" → ["User", "Profile", "Name"]. Smart tokenization recognizes camelCase humps, ALLCAPS acronym runs, and existing separators.
  2. Lowercase each token. ["user", "profile", "name"].
  3. Join with a single period. "user.profile.name".
  4. Preserve numeric attachments. "HTML5 parser" → "html5.parser", keeping the "5" attached to "html" rather than splitting it into a separate token.
  5. Strip diacritics and special characters. "Café Login" → "cafe.login". Non-ASCII characters are transliterated to their closest ASCII equivalents because most config systems and i18n tools expect ASCII keys.

The acronym edge case

Consider XMLParser. A naive converter inserts a period before every uppercase letter, producing x.m.l.parser. The smart approach recognizes "XML" as a single token (an acronym run) and produces xml.parser. Our converter detects ALLCAPS runs and treats them as single semantic units before the case transition to the next word.

The version-number edge case

A title like "Config v1.2 Settings" creates ambiguity: are the dots in "v1.2" word separators or part of the version string? Most converters treat ALL dots in the output as word separators (so the input v1.2 becomes v1.2 directly, preserving the original dots). If you need to escape dots within tokens, that's a pre-processing step — replace them with another character before conversion, then restore them.

Worked examples

Input dot.case
user profile name user.profile.name
auth login button auth.login.button
home page title home.page.title

Related case formats

Need more conversion options?

Open the full converter →