A string case converter reshapes words into naming conventions used by source code, file paths, configuration keys, and prose. Paste one identifier or a list, then compare twelve results without repeatedly editing separators or capitalization by hand.
This converter recognizes ordinary separators as well as boundaries inside mixed-case identifiers. It updates every result as you type and keeps separate input lines separate, which is useful when migrating a list of names.
How to Use the String Case Converter
Convert one or more names and copy the convention you need.
- Enter identifiers in Text or identifiers (one per line).
- Review the live results labeled camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Train-Case, dot.case, path/case, Title Case, Sentence case, lower case, and UPPER CASE.
- Select Copy on the row containing the result you want.
- For a list, keep one source value per line; the copied result preserves those line breaks.
How Word Boundaries Become Identifier Cases
Case conversion begins by splitting each line into words. Spaces, punctuation, underscores, hyphens, slashes, and other characters that are not Unicode letters or numbers act as separators. The converter also finds a boundary between a lowercase letter or digit and a following uppercase letter, so profileID becomes profile and ID.
Runs of capital letters receive additional handling when a normal capitalized word follows them. For example, XMLHttpRequest is separated into XML, Http, and Request. The output then lowercases, uppercases, capitalizes, or joins those words with the separator required by the selected case.
API response-code
camelCase: apiResponseCode
snake_case: api_response_code
kebab-case: api-response-code
The conversion is structural, not semantic. It does not know that an acronym should remain capitalized, so PascalCase turns API response into ApiResponse, not APIResponse. If a project has acronym rules, review the generated names before committing them.
Choosing a Naming Convention for Code and Data
Common conventions communicate where a name belongs, but the language or framework remains the authority. JavaScript commonly uses camelCase for variables and functions and PascalCase for classes or components. CONSTANT_CASE is often used for constants, while snake_case and kebab-case appear frequently in data fields, command-line flags, URLs, and filenames.
dot.case and path/case are useful for hierarchical-looking names, but this tool only changes separators. A generated slash does not create a directory, and a generated dot does not establish a configuration namespace. Check whether the destination treats those characters as syntax.
Title Case here capitalizes the first character of every word and lowercases the rest. It does not apply editorial rules for articles, conjunctions, brand names, or acronyms. Sentence case capitalizes only the first word and lowercases the remaining words, so it is best treated as a mechanical starting point rather than a copy-editing system.
When renaming many values, compare the old and new lists with the text diff checker. For keys embedded in structured data, the JSON formatter can make their surrounding structure easier to inspect.
Unicode, Acronyms, and Other Edge Cases
The splitter accepts Unicode letters and numbers, so accented Latin text and identifiers in many other scripts remain words instead of being discarded. Case changes use JavaScript's standard, locale-independent toLowerCase() and toUpperCase() behavior. They are not tailored to a selected language, and some locale-sensitive casing expectations may differ.
Symbols and emoji are separators because they are not letters or numbers. Repeated separators collapse into one word boundary, and leading or trailing separators disappear. Blank input lines remain blank in every output because each line is converted independently.
Different inputs can therefore produce the same result. user-id, user id, and user_id all become userId in camelCase, while API and api both become api. Do not use this transformation as a collision-free key generator without checking uniqueness.
The tool does not validate whether a result is a legal identifier in a particular language. A name can start with a number, match a reserved keyword, or contain Unicode characters that a compiler or style guide rejects. Apply the destination language's identifier rules after conversion.
Safe Renaming and Local Processing
The conversion runs locally in your browser; the text is not uploaded for processing. That makes the tool practical for source identifiers and sanitized schema samples, but it does not make sensitive content harmless. Avoid pasting secrets or personal data when a representative placeholder would work.
Changing case can be a breaking change. API property names, database columns, environment variables, CSS classes, and case-sensitive paths may be consumed by systems outside the current repository. Search references, account for serialized data, and plan a compatibility or migration period when external consumers are involved.
Case-insensitive filesystems can also hide collisions that appear in deployment on a case-sensitive filesystem. Renaming Report.ts to report.ts may need special handling in version control and build tooling. Verify the actual destination rather than assuming a displayed string is a safe rename.
Frequently Asked Questions
Does the converter preserve multiple lines?
Yes. It converts each line separately and joins the results with the original line boundaries, including blank lines. This lets you paste a list of identifiers and copy the corresponding list from one result row.
How does it handle camelCase and acronyms?
It detects lowercase-to-uppercase transitions and separates a capital-letter run before a following capitalized word. That lets XMLHttpRequest split into XML, Http, and Request. Output rules normalize the words, so acronyms are not preserved automatically in camelCase, PascalCase, or Title Case.
Can I convert accented or non-Latin text?
The word splitter recognizes Unicode letters and numbers, so it can retain far more than ASCII text. Casing uses JavaScript's locale-independent methods, however, so language-specific capitalization may not match an editor's expectations. Review names intended for natural-language display.
Is Title Case suitable for article headlines?
Not without review. The tool capitalizes every word's first character and lowercases the rest; it does not apply a publication's rules for short words, proper nouns, or acronyms. Use it for mechanical normalization, then edit the wording.
Will the result be a valid programming identifier?
Not necessarily. The converter does not check reserved words, allowed starting characters, project lint rules, or collisions with existing names. Validate the result in the language and codebase where it will be used.
References: Unicode Standard Annex #29: Text Segmentation · MDN: String.prototype.toLowerCase().