Skip to main content

Turn Any Text Into dot.case Format Convert text to dot.case format for configuration keys and properties.

dot.case Converter illustration
📝

dot.case Converter

Convert text to dot.case format for configuration keys and properties.

1

Enter Text

Type or paste text to convert to dot.case.

2

View dot.case Output

View your text with dots between lowercase words.

3

Copy Output

Copy the dot.case result for configuration files.

Loading tool...

What Is dot.case Converter?

A dot.case converter transforms text into dot-separated lowercase format, converting phrases like "database host name" into "database.host.name" or camelCase strings like "maxRetryCount" into "max.retry.count". This conversion is particularly useful for developers working with Java properties files, Spring Boot configuration, and Gradle build scripts, where the dot case format is a standard property key format. For instance, in a Spring Boot application, configuration keys are often defined in dot-separated notation, such as "server.port" or "database.username", making it easy to manage complex configurations.

Developers use this tool to solve the problem of manually converting text into the required dot-separated lowercase format, which can be time-consuming and error-prone. It is especially helpful when dealing with long phrases or multiple words that need to be converted into a single property key. The tool's ability to split words based on uppercase letters, underscores, hyphens, dots, and spaces makes it particularly effective for handling a wide variety of input formats.

What sets this tool apart is its implementation of the `splitWords` function, which uses regular expressions to handle different word separation scenarios, ensuring accurate conversion of text into dot-separated format. It also supports multi-line input, allowing users to convert multiple lines of text at once and producing output in a consistent dot-separated lowercase format, making it easy to integrate with existing Java properties or Spring Boot configuration files, where the dot case naming convention is commonly used for property keys.

Why Use dot.case Converter?

  • Standard for Java and Spring Boot properties files
  • Natural hierarchical naming convention
  • Used in Gradle, Maven, and other build tools
  • Handles conversion from any input format
  • Creates readable configuration keys

Common Use Cases

Java Properties

Format Spring Boot application.properties keys: server.port, spring.datasource.url.

Configuration Files

Create hierarchical config keys for YAML-to-properties conversion.

Package Naming

Java and Kotlin package names follow reverse domain convention in dot.case format.

Build Scripts

Gradle and Maven build scripts rely on dot notation for property names.

Technical Guide

The tool's core logic resides in the `splitWords` function, which employs regular expressions to identify word boundaries. It first replaces transitions from lowercase to uppercase letters with spaces, effectively splitting camelCase words. Then, it inserts spaces between consecutive uppercase letters followed by a lowercase letter, handling cases like "ABCdef". The function also replaces underscores, hyphens, and dots with spaces, allowing it to handle strings containing these separators. After trimming the input string and splitting it into an array of words using one or more whitespace characters as delimiters, the function filters out any empty strings.

The `onProcess` callback uses the `splitWords` function to convert each line of the input text into dot-separated format. It splits the input string into lines, maps over each line, and applies the `splitWords` function to split it into words. Each word is then lowercased using the `toLowerCase` method, and the resulting array of words is joined back together with dots using the `join` method. The converted lines are then joined back together with newline characters to form the final output string. This process is facilitated by React's `useCallback` hook, which memoizes the `onProcess` function to prevent unnecessary re-renders. The tool's UI is built using the `TextToolLayout` component, which provides input and output fields for the user to interact with.

Tips & Best Practices

  • 1
    Spring Boot uses dot.case for all configuration properties
  • 2
    dots create natural hierarchy: app.database.host = nested "app > database > host"
  • 3
    Java package names use reverse domain in dot.case: com.example.myapp
  • 4
    Use dot.case for YAML property flattening and unflattening
  • 5
    Some logging frameworks use dot.case for logger hierarchy: com.myapp.service.UserService

Related Tools

Frequently Asked Questions

Q What is dot.case?
dot.case uses all lowercase letters with dots between words: server.port, database.host.name, app.config.timeout.
Q Where is dot.case used?
Java properties files, Spring Boot configuration, Gradle build scripts, and hierarchical config systems.
Q Can I use dots in variable names?
In most programming languages, dots are member-access operators and cannot be used in variable names. dot.case is mainly for configuration strings.
Q How does dot.case relate to JSON nesting?
"app.db.host" = "localhost" is equivalent to { app: { db: { host: "localhost" } } } in JSON.
Q Is dot.case the same as dot notation?
No, they are different. dot.case is a naming convention, while dot notation typically refers to accessing object properties (object.property) in code.

About This Tool

dot.case Converter is a free online tool by FreeToolkit.ai. All processing happens directly in your browser — your data never leaves your device. No registration or installation required.