Skip to main content
CaseSwitch

dot.case Converter

Use the CaseSwitch dot.case Converter to turn a phrase, camelCase field, or snake_case column into a dotted path (user.profile.id). Paste one name or a list, review the hierarchy, and copy the result. Conversion runs in this browser — nothing is uploaded.

Written by the CaseSwitch editorial team. We maintain these tools in the browser so drafts, keys, and images stay on your device.

Last reviewed: 23 July 2026

Processed locally in your browser. Nothing is sent to a server.

Paste or type text to convert. Output stays empty until there is input.

Character count: 0 · Word count: 0 · Line count: 0

Examples

Phrase to dot.case

Input

User Profile ID

Output

user.profile.id

Localization-style key

Input

error invalid password

Output

error.invalid.password

From camelCase

Input

userProfileId

Output

user.profile.id

From snake_case

Input

user_profile_id

Output

user.profile.id

From kebab-case

Input

errors-validation-email

Output

errors.validation.email

How to use

  1. Paste a phrase, snake_case name, kebab-case slug, or camelCase identifier.
  2. Review the dotted path. Shorten or rename segments if the hierarchy looks too deep.
  3. Copy the result. For a list, convert one name per line.

What this tool is for

dot.case joins lowercase words with periods: errors.validation.email. Translation catalogs (i18next, Rails YAML), nested config accessors, and some metric or event names treat the dot as a hierarchy separator rather than a sentence period. This converter exists so you can map a readable label or another naming style into that shape without hand-editing a long key list. It is a case/separator transform, not a runtime deep-get library.

How it works

Word boundaries come from spaces, hyphens, underscores, and dots, and from camelCase / PascalCase shifts already in the input. Segments are lowercased and joined with a single period. Repeated separators collapse. Punctuation that is not a separator stays attached to the segment. You still decide how deep the hierarchy should be — the tool only rewrites separators and case.

When to use it

Building i18n keys, namespacing telemetry events, matching a config schema that already uses dotted paths, and turning spreadsheet headers into lodash-style accessor strings. Paste one identifier per line for bulk work, then shorten overly deep keys by hand.

When not to use it

File names on Windows can be awkward with many dots. CSS class selectors use the dot as a combinator, not a word separator. Public URL paths should use kebab-case or the Slug Generator. JSON APIs usually nest objects ({ user: { profile } }) rather than flattening to user.profile unless a flatten/unflatten library is part of the contract.

How it compares to related tools

kebab-case is for URLs and CSS. snake_case is for Python and SQL. camelCase and PascalCase are the JavaScript cousins. The Slug Generator strips punctuation for public paths and always uses hyphens. Longer background: Developer naming conventions.

Common mistakes

Putting spaces in keys after conversion, mixing camelCase segments (User.profile), creating keys that collide with object prototype paths, and treating DNS hostnames as free-form dotted phrases — DNS has its own length and label rules.

i18n keys and nested config

Many localization engines store keys as dotted strings (errors.validation.email) even when the runtime expands them into nested objects. Keep keys short, stable, and lowercase. Prefer a consistent depth (feature.section.message) over mixing one-level and five-level keys in the same catalog. After converting a spreadsheet of English labels, review duplicates and rename collisions before you commit the file.

Flattened paths vs real nesting

A dotted key is a string. A JSON object with nested properties is a different model. Use this converter when the consumer expects a flat dotted string. Use nested JSON (and the JSON Formatter) when the API already speaks objects. Libraries that expand user.profile.id into { user: { profile: { id } } } are separate from this page — we only rewrite the text of the key.

Frequently asked questions

Is dot.case good for JSON APIs?+

Usually no. Nested objects or camelCase keys are easier for clients. Dotted keys appear more in flatten/unflatten utilities and i18n catalogs.

Can I use this for DNS hostnames?+

DNS labels have their own rules (punycode, length). Do not treat this converter as a hostname validator.

How does it handle camelCase input?+

Camel and Pascal shifts count as word breaks, so userProfileId becomes user.profile.id. Review acronyms if the split looks wrong.

Does it strip punctuation?+

Spaces, underscores, hyphens, and dots are treated as word breaks. Other punctuation stays attached to the adjacent word.

Can I convert a list of keys at once?+

Paste one phrase or identifier per line and convert. Review depth and duplicates before committing an i18n file.

Is my text uploaded?+

Dot.case conversion is local to your browser session. Skip pasting vault secrets or production tokens into the box.

Does this tool send my payload to CaseSwitch?+

No. Formatting, encoding, and naming conversions for this page run in your browser after load — your sample stays on the device.

Related guides

Read our original articles on this topic.

Related tools

kebab-case Converter

CSS class names and BEM blocks, REST path segments, data-testid values, design-token names that a style guide wants dashed, and a first-pass convert from camelCase props into a URL-ish token. Paste one name per line for bulk work.

snake_case Converter

Aligning a Node or TypeScript mapper with PostgreSQL column names, generating Python method names from a product spec, turning spreadsheet headers into database fields, and preparing keys that will later become environment-style constants (then uppercasing). Paste one identifier per line for bulk work.

Slug Generator

Blog posts, documentation pages, product listing URLs, knowledge-base articles, and CMS permalink fields when you have a working title and need a path before publish. Also useful for turning a noisy marketing headline into a short candidate slug you can still edit by hand.

camelCase Converter

Migrating SQL columns to a Node API, turning spreadsheet headers into TypeScript property names, renaming CSS modules that a linter wants in camelCase, and converting a design-doc phrase into a variable name. Paste a list, one identifier per line, for bulk work, then review acronyms before you commit.

PascalCase Converter

Naming React components and matching file names to their default export, generating TypeScript interfaces from a design-doc phrase list, turning SQL or API field labels into C# or Java class names, and converting a kebab-case or snake_case token into a type name. Paste one identifier per line for bulk work, then review acronyms before you commit.