Text Case Converter

Result
Camel Case
loremIpsumDolorSitAmet
Capital Case
Lorem Ipsum Dolor Sit Amet
Constant Case
LOREM_IPSUM_DOLOR_SIT_AMET
Dot Case
lorem.ipsum.dolor.sit.amet
Kebab Case
lorem-ipsum-dolor-sit-amet
No Case
lorem ipsum dolor sit amet
Pascal Case
LoremIpsumDolorSitAmet
Pascal Snake Case
Lorem_Ipsum_Dolor_Sit_Amet
Path Case
lorem/ipsum/dolor/sit/amet
Sentence Case
Lorem ipsum dolor sit amet
Snake Case
lorem_ipsum_dolor_sit_amet
Train Case
Lorem-Ipsum-Dolor-Sit-Amet
Overview
Generated by AI

The Case Converter is a text formatting tool that instantly converts input text into 12 different naming formats. Suitable for programming development, text editing, data processing, and similar scenarios, helping quickly standardize naming conventions.

Key Features

The tool supports one-time output of 12 naming formats without individual conversion. All conversions are completed locally in the browser in real-time, displaying all format results immediately after text input. Each format has an independent copy button for quick retrieval of desired formats.

Supports mixed format input; the tool intelligently identifies word boundaries and can accurately convert regardless of original text format.

Supported Formats

camelCase

Words are joined together with the first word lowercase and subsequent words capitalized.

Example: lorem ipsum dolorloremIpsumDolor

Commonly used for: JavaScript/TypeScript variable names, Java method names, JSON key names

Capital Case

Each word's first letter is capitalized, with words separated by spaces.

Example: lorem ipsum dolorLorem Ipsum Dolor

Commonly used for: titles, subtitles, proper nouns

CONSTANT_CASE

All letters uppercase, with words separated by underscores.

Example: lorem ipsum dolorLOREM_IPSUM_DOLOR

Commonly used for: program constants, environment variables, configuration item keys

dot.case

All letters lowercase, with words separated by dots.

Example: lorem ipsum dolorlorem.ipsum.dolor

Commonly used for: file extensions, package names, configuration property paths

kebab-case

All letters lowercase, with words separated by hyphens.

Example: lorem ipsum dolorlorem-ipsum-dolor

Commonly used for: URLs, CSS class names, HTML attributes, filenames

no case

All letters lowercase, with words separated by spaces, for text normalization.

Example: Lorem IPSUM Dolorlorem ipsum dolor

Commonly used for: text preprocessing, data cleaning

PascalCase

Each word's first letter is capitalized, directly joined without separators.

Example: lorem ipsum dolorLoremIpsumDolor

Commonly used for: class names, TypeScript types, React component names

Pascal_Snake_Case

Each word's first letter is capitalized, with words separated by underscores.

Example: lorem ipsum dolorLorem_Ipsum_Dolor

Commonly used for: certain database naming conventions, specific coding style guides

path/case

All letters lowercase, with words separated by slashes.

Example: lorem ipsum dolorlorem/ipsum/dolor

Commonly used for: file paths, URL paths, directory structures

Sentence case

Only the first word's first letter is capitalized, rest lowercase.

Example: lorem ipsum dolorLorem ipsum dolor

Commonly used for: regular sentences, descriptive text, paragraph content

snake_case

All letters lowercase, with words separated by underscores.

Example: lorem ipsum dolorlorem_ipsum_dolor

Commonly used for: Python variable names, database column names, Ruby method names, configuration files

Train-Case

Each word's first letter is capitalized, with words separated by hyphens.

Example: lorem ipsum dolorLorem-Ipsum-Dolor

Commonly used for: HTTP header fields, certain configuration formats

Use Cases

Programming Development

Quickly convert naming formats when switching between different programming languages. For example, convert Python's user_name to JavaScript's userName, or convert API response's user-id to code's userId.

Code Refactoring

Batch modify variable naming styles to standardize code conventions. For example, convert project variable names from snake_case to camelCase uniformly.

Data Processing

Standardize field naming formats when processing data from different sources. For example, convert database query result snake_case field names to frontend camelCase.

File Naming

Convert text to file-name-suitable formats like kebab-case or snake_case.

URL Generation

Convert titles or descriptions to URL-friendly kebab-case format.

Best Practices

Choosing Appropriate Naming Format

Different programming languages and usage scenarios have different naming conventions:

  • JavaScript/TypeScript: Variables and functions use camelCase, classes and types use PascalCase, constants use CONSTANT_CASE
  • Python: Variables and functions use snake_case, classes use PascalCase, constants use CONSTANT_CASE
  • CSS: Class names use kebab-case
  • URL: Paths use kebab-case or snake_case
  • Database: Table and column names typically use snake_case
  • Filenames: Use kebab-case or snake_case, avoid spaces and special characters

Batch Processing

When converting multiple text segments, input and copy results individually, or use editor's batch replace function with conversion results.

Mixed Format Input

The tool can intelligently recognize mixed formats; for example, input someVariable-name_test can correctly identify four words and convert them.

Important Notes

The tool identifies and converts based on word boundaries; for continuous unseparated lowercase strings (like loremipsumdolor), it may not correctly identify word boundaries.

Conversion results do not change word spelling itself, only adjusting case and separators.

All processing is completed locally in the browser; text is not uploaded to servers, protecting privacy.

FAQ

The tool cannot correctly recognize my input?

Ensure input text has clear separators between words (spaces, underscores, hyphens, camelCase capitalization, etc.). Pure lowercase unseparated strings may not correctly identify word boundaries.

Can I convert multiple text segments at once?

The tool currently processes one text segment at a time. For batch conversion, process individually or use editor's find-replace function with conversion results.

Which naming format is best?

There is no absolute "best" format; choose based on project specifications and usage scenarios. Following team or community coding standards and maintaining consistent code style is most important.

Converted format causes errors in my code?

Ensure chosen format complies with current programming language naming conventions. For example, Python does not recommend camelCase for variable names; JavaScript typically does not use snake_case.

Can I customize conversion rules?

The tool currently provides fixed 12 format conversions and does not support custom rules. For special needs, use regular expressions or programming scripts for processing.

Show more