08 / Text / case-converter
Case Converter
Convert text between camelCase, snake_case, Title Case and more.
How to use
- 01Type or paste text into the Text box, such as a phrase, a variable name or a column header.
- 02Read all nine conversions at once: UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE.
- 03Press Copy next to the format you need to copy just that version.
- 04Press Clear to empty the input and convert something else.
What is this tool?
The case converter rewrites text into nine common letter cases and programming naming conventions at the same time, so you can compare them and copy the one you need. It detects word boundaries in spaces, punctuation and existing camelCase or PascalCase names, so it also converts identifiers between conventions. Everything runs locally in your browser.
camelCase vs snake_case vs kebab-case: naming conventions by language
camelCase (userAccountSettings) is the standard for variables and functions in JavaScript, TypeScript and Java, and is common for JSON keys. PascalCase (UserAccountSettings) is used for classes, types and React components, and for most identifiers in C#.
snake_case (user_account_settings) is the convention in Python and Ruby and is widely used for database tables and columns. CONSTANT_CASE (USER_ACCOUNT_SETTINGS) marks constants and environment variables. kebab-case (user-account-settings) is used for URL slugs, CSS class names, HTML attributes and CLI flags, where underscores or capitals are awkward.
Mixing conventions is a common source of bugs at system boundaries. A Python API may return created_at while the JavaScript client expects createdAt, and a field that silently comes back undefined is easy to miss in tests. Pasting the field name here shows every variant side by side, so you can confirm the exact spelling each layer expects.
How words are detected in identifiers
For the programming cases, the converter splits the input into words at any character that is not a letter or digit, and also at case changes inside a name. That means "user account settings", "user-account-settings" and "userAccountSettings" all produce the same set of words.
Runs of capitals are treated as an acronym: "parseHTTPResponse" splits into parse, HTTP and Response, which becomes parse_http_response in snake_case and ParseHttpResponse in PascalCase. Punctuation and other symbols are dropped from these outputs, so they are safe to use as identifiers.
UPPERCASE, lowercase, Title Case and Sentence case work on the text as written and keep punctuation and spacing. Sentence case capitalizes the first letter of the text and the first letter after a period, exclamation mark or question mark.
Common use cases
- Converting API field names between snake_case and camelCase when mapping payloads
- Turning a page title into a kebab-case URL slug or CSS class
- Creating CONSTANT_CASE names for environment variables
- Normalizing test case titles or spreadsheet headers to Title Case or Sentence case
- Generating PascalCase component or class names from a plain description
FAQ
How do I convert text to camelCase?
Paste the text into the Text box and press Copy next to the camelCase row. Spaces, hyphens and underscores are removed and each word after the first is capitalized.
How do I convert camelCase to snake_case?
Paste the camelCase name. The converter splits it at each capital letter, so userAccountId appears as user_account_id in the snake_case row.
What is the difference between camelCase and PascalCase?
camelCase starts with a lowercase letter (orderTotal), while PascalCase capitalizes every word including the first (OrderTotal).
What is kebab-case used for?
kebab-case joins lowercase words with hyphens and is used for URL slugs, CSS class names, HTML attributes and command-line flags.
Can I convert several formats at once?
Yes. All nine formats are shown together and update as you type; copy whichever you need.