Case Converter
Convert online text case into title, sentence, camel, Pascal, snake, kebab, dot, constant, and slug formats for identifiers, headings, URLs, and code.Case Converter
{{ selectedOutput }}
| Case | Output | Characters | Best fit | Copy |
|---|---|---|---|---|
| {{ row.label }} Selected | {{ row.output || ' ' }} |
{{ row.characters.toLocaleString() }} | {{ row.use }} |
| Case style | Example | Use case | Copy |
|---|---|---|---|
| {{ row.label }} | {{ row.example }} |
{{ row.use }} |
{{ formattedJson }}
Case conversion changes how words are capitalized and joined so the same phrase can fit headings, filenames, URLs, code identifiers, data fields, and constants. The words should still mean the same thing after conversion.
Different destinations expect different shapes. A prose sentence may need sentence case, a report heading may need title case, a Python field may need snake case, a JavaScript key may need camel case, and a readable URL path usually uses lowercase words joined by hyphens.
Case conversion is not grammar editing. Acronyms, accents, punctuation, and line breaks still need review when the output will be used in code, URLs, or published copy.
Technical Details:
The conversion process first separates the source into word tokens. It recognizes letters and numbers, adds boundaries inside mixed identifiers such as quarterlyRevenue, removes apostrophes for token joining, and treats underscores, hyphens, dots, slashes, and colons as separators for code-style outputs.
Display-style outputs such as lower case, upper case, sentence case, title case, and capitalized case transform words in their original line context. Code-style outputs collect tokens and join them with the target separator or capitalization rule.
| Output | Rule | Common use |
|---|---|---|
| camelCase | First token lowercase, later tokens capitalized, no separators. | JavaScript variables and JSON properties. |
| PascalCase | Every token capitalized, no separators. | Classes, components, exported symbols. |
| snake_case | Lowercase tokens joined with underscores. | Python, SQL fields, analytics names. |
| CONSTANT_CASE | Uppercase tokens joined with underscores. | Constants and environment variables. |
| kebab-case | Lowercase tokens joined with hyphens. | CSS classes, CLI flags, filenames. |
| url-slug | Lowercase, hyphen-joined tokens with accent folding. | Readable URL path segments. |
The acronym policy changes mixed-case identifiers. Normalize acronyms turns API response into apiResponse. Keep source acronyms uppercase can preserve all-caps tokens in later positions, which is useful when a codebase already uses that convention.
Everyday Use & Decision Guide:
Choose Target case from the destination, not from personal preference. Use title or sentence case for human-facing copy, snake case for many Python and data workflows, camel case for many JavaScript keys, and url-slug when the result will become a path segment.
Conversion scope matters when the source has multiple lines. Each line separately keeps lists of headings, filenames, or field names separate. Whole source as one phrase is better when pasted line breaks are accidental and the output should be one identifier.
- Use Headline title case when small joining words should stay lowercase inside titles.
- Use Capitalize every word when every token should start uppercase.
- Turn on Fold accents for code cases for ASCII-oriented slugs, keys, filenames, and CSS-friendly values.
- Check Case Variant Ledger before copying if a neighboring format may fit better.
A warning about large input or whole-source line breaks means the output may still be valid, but it deserves a slower check before replacing production names.
Step-by-Step Guide:
Convert a phrase, list, or text-like file into the target format and verify the neighboring variants.
- Paste into Source text, drop text, or load a TXT, MD, CSV, JSON, or LOG file under 2 MB. The summary should show input and output character counts.
- Select Target case. The Converted Text tab updates to the chosen output.
- Set Conversion scope to whole source for one phrase or each line for lists.
- Open Advanced and set Title style, Acronym policy, and Fold accents for code cases to match the destination.
- Review Case Variant Ledger for all supported outputs and Case Use Guide for examples and use cases.
- If the file status says the browser could not read the file or the file is too large, paste a smaller text sample instead.
Copy the selected output only after checking punctuation, acronym casing, and separators against the destination's naming rules.
Interpreting Results:
Converted Text is the selected output. Case Variant Ledger is the comparison table that shows every supported format from the same source and options.
Do not assume an identifier is valid in every language just because the casing looks right. Reserved words, maximum length, leading digits, and project-specific naming rules still belong to the destination system.
Verify the result by checking one representative line from the ledger. If the token split is wrong, fix the source spacing or switch scope before copying a large batch.
Worked Examples:
Quarterly Revenue Forecast API v2 with snake_case and normalized acronyms becomes quarterly_revenue_forecast_api_v2. With PascalCase, it becomes QuarterlyRevenueForecastApiV2.
A two-line source such as customer profile and URL value should use Each line separately when creating two field names. In Whole source as one phrase, code-style outputs combine both lines into one value.
A phrase such as Cafe menu updates becomes a cleaner url-slug when accents are folded, producing cafe-menu-updates rather than carrying the accented source character into a path.
FAQ:
Will it preserve exact acronym casing?
Use Acronym policy. Normalize acronyms for conventional mixed-case identifiers, or keep source acronyms uppercase when your project already writes tokens such as API or URL that way.
Should I use slug or kebab case?
Use url-slug for readable path segments because it always folds accents and joins lowercase tokens with hyphens. Use kebab-case for general hyphenated identifiers such as CSS classes or file names.
Why did several lines become one identifier?
Whole source as one phrase combines non-display code cases across line breaks. Switch Conversion scope to Each line separately for lists.
What files can I load?
The file loader accepts text-like TXT, MD, CSV, JSON, and LOG files under 2 MB. If another format fails, paste the source text directly.
Glossary:
- Token
- A word or number segment extracted from the source text.
- camelCase
- A no-separator form with a lowercase first token and capitalized later tokens.
- PascalCase
- A no-separator form where every token starts uppercase.
- snake_case
- Lowercase tokens joined by underscores.
- url-slug
- A lowercase hyphen-joined value intended for readable URL paths.
References:
- Camel case, MDN Web Docs, July 11, 2025.
- PEP 8 - Style Guide for Python Code, Python Software Foundation.
- URL Structure Best Practices for Google Search, Google Search Central.