✨ Free · No sign-up · Runs in your browser

CONSTANT_CASE and dot.case Converter

Convert text to CONSTANT_CASE or dot.case, and compare the other naming styles. Free and instant.

Writing

Code

Other

Clean up

0 characters 0 without spaces 0 words 0 sentences 0 lines 0 min read

Shortcuts: Ctrl/Cmd + Enter copies the result, Ctrl/Cmd + Z undoes the last clean-up.

Naming conventions at a glance

Programmers join words without spaces in several standard ways. This page opens on CONSTANT_CASE. The buttons above switch the same text to dot.case, camelCase, PascalCase, snake_case, kebab-case or path/case.

You typeCONSTANT_CASE result
max retry countMAX_RETRY_COUNT
apiBaseUrlAPI_BASE_URL
user-first-nameUSER_FIRST_NAME
You typedot.case result
max retry countmax.retry.count
apiBaseUrlapi.base.url
user-first-nameuser.first.name

The styles compared

StyleExampleUsually used for
camelCasemaxRetryCountVariables and functions in JavaScript, Java, Swift, Kotlin
PascalCaseMaxRetryCountClasses and types; React components
snake_casemax_retry_countPython, Ruby, Rust variables and functions; database columns
CONSTANT_CASEMAX_RETRY_COUNTConstants; environment variables
kebab-casemax-retry-countURLs, CSS classes, file names
dot.casemax.retry.countConfiguration keys and property names

CONSTANT_CASE

CONSTANT_CASE, also called SCREAMING_SNAKE_CASE, writes every letter in capitals with underscores between words. It marks values that do not change. Python's PEP 8 style guide asks for constants in this form, many Java and JavaScript projects use it, and environment variables are almost always written this way, such as DATABASE_URL.

dot.case

dot.case writes lowercase words separated by dots. You see it mostly in configuration, where dots show a hierarchy, such as server.port or logging.level.root. Because the dot also means "member of" in most languages, it is rarely used for variable names.

Using the converter

Paste a phrase or an existing name in any style. Underscores, hyphens, dots, spaces and the capitals inside names are all treated as word breaks, so you can convert between styles in either direction. Several lines convert together.

Single-style pages with more detail: camelCase, PascalCase, snake_case and kebab-case.

All converters: Uppercase to Lowercase · Lowercase to Uppercase · ALL CAPS Converter · ALL CAPS to Sentence Case · Capitalize Text · Title Case · Sentence Case · Toggle Case · Alternating Case · camelCase · PascalCase · snake_case · kebab-case

Questions

What is CONSTANT_CASE?
Words in capitals joined with underscores, such as MAX_RETRY_COUNT. It is used for constants and environment variables.
What is dot.case?
Lowercase words separated by dots, such as server.port. It is common in configuration files.
Is CONSTANT_CASE the same as SCREAMING_SNAKE_CASE?
Yes. Both names mean capital letters with underscores between words.
Can I convert camelCase to CONSTANT_CASE?
Yes. The converter splits the name where the capitals fall, so apiBaseUrl becomes API_BASE_URL.
Does it handle several lines?
Yes. Each line is converted on its own.