Case Converter
|
Convert text between camelCase, PascalCase, snake_case, SCREAMING_SNAKE_CASE, kebab-case, Title Case, lowercase, and UPPERCASE. Results update live.
How word splitting works
The converter detects word boundaries using three rules applied together: whitespace (spaces, tabs, newlines), delimiters (underscores, hyphens), and case transitions (a lowercase letter followed by an uppercase letter).
This handles the most common naming patterns: fooBar splits into [foo, bar], my_variable splits into [my, variable], HTTPRequest splits into [HTTP, Request], and foo-bar-baz splits into [foo, bar, baz].
When this is useful
Cross-language migration — Python functions use snake_case, JavaScript variables use camelCase, CSS classes use kebab-case, SQL columns use snake_case. Copying an identifier between contexts requires reformatting.
API field mapping — a REST API returning user_first_name needs to become userFirstName in a TypeScript interface. Converting a list of field names is faster here than doing it manually.
Slug generation — converting a page title like "My New Article" to my-new-article for a URL.
Constant naming — USER_SESSION_TIMEOUT as SCREAMING_SNAKE_CASE from a config field name.
See also: JSON Formatter
Edge cases
Acronyms — HTTP_REQUEST is treated as two words (HTTP, REQUEST). In camelCase output this becomes httpRequest. If your convention preserves acronyms (HTTPRequest), do a manual pass on those names.
Numbers — digits are treated as separate tokens. request2fa becomes request2fa in snake_case (unchanged if it is one token) or may split depending on your input format.
Naming conventions by language and context
Each programming language and domain has established conventions. Using the wrong case for a language is technically valid but signals unfamiliarity and breaks linter rules.
Knowing the expected convention for a context lets you convert from the source format with one click instead of retyping.
camelCase: userName, fetchUserData, isLoadingPascalCase: UserService, HttpClient, AuthProviderSCREAMING_SNAKE_CASE: MAX_RETRIES, DEFAULT_TIMEOUTsnake_case: get_user, parse_response, max_retriesPascalCase: UserModel, HttpResponseSCREAMING_SNAKE_CASE: MAX_CONNECTIONS, BASE_URLPascalCase: UserID, ParseRequest, HTTPClientcamelCase: userID, parseRequestkebab-case: btn-primary, data-user-id, aria-labelsnake_case: user_id, created_at, first_namekebab-case: /blog/my-new-article, /tools/json-formatterSCREAMING_SNAKE_CASE: DATABASE_URL, API_SECRET_KEYConverting API field names
REST APIs frequently return snake_case field names (because the server is often Python or Ruby), while TypeScript frontends use camelCase. The conversion is mechanical and error-prone when done by hand across many fields.
Paste a list of field names from the API documentation — one per line — and convert the entire list at once to the case expected in your TypeScript interface or JavaScript object. Copy the result and use it as-is.
The same workflow works in reverse: you have TypeScript interface properties and need to document them in SQL column or API contract format.
user_first_name
user_last_name
created_at
order_total_centsuserFirstName
userLastName
createdAt
orderTotalCentsuser_first_name
user_last_name
created_at
order_total_centsSee also: JSON Formatter
Frequently Asked Questions
- Does it handle Unicode characters?
- The splitter uses a regex that captures Latin extended characters (À–ÿ range) in addition to ASCII. Most European accented characters are preserved. Complex scripts (CJK, Arabic, etc.) are not split on case transitions since they have no letter case.
- Why does Title Case capitalize every word including "and", "of", "the"?
- This tool applies simple Title Case: the first letter of every whitespace-separated word is capitalized. It does not apply style-guide rules (Chicago, APA) that leave short prepositions lowercase.
- What is Sentence case?
- Sentence case capitalizes the first character of the entire string and the first character after each sentence-ending punctuation mark (. ! ?). Useful for display strings and UI labels.
- Can I convert multiple lines at once?
- Yes. Each line is converted independently. If you paste a list of variable names, each one is converted to the selected case.
- What is kebab-case typically used for?
- kebab-case is the standard for CSS class names, HTML data attributes, URL slugs, npm package names, and command-line flag names. It uses hyphens as word separators and is always lowercase. Examples: btn-primary, data-user-id, my-package-name, /blog/how-to-use-git.
- Does it preserve existing formatting like mixed case in acronyms?
- No. The converter normalizes all input to lowercase words before applying the target case. An input of "HTTPRequest" is split into ["http", "request"] and converted accordingly — HTTP does not receive special treatment. For acronym-preserving conventions (common in Go), do a final manual pass on the output.