Case Converter
camelCase, snake_case, kebab-case, PascalCase and more.
About this tool
Type or paste text and get it in every common naming convention at once: camelCase, PascalCase, snake_case, CONSTANT_CASE, kebab-case, Title Case, sentence case, dot.case and a URL slug. Works line by line, so you can convert a whole list of names.
How to use it
- Type or paste a name or phrase. Put one per line to convert a whole list.
- Every naming style is shown at once: camelCase, PascalCase, snake_case, kebab-case and more.
- Click Copy on the style you need.
Questions
- Which case should I use for what?
- Common conventions: camelCase for JavaScript and Java variables, PascalCase for classes and React components, snake_case for Python and database columns, CONSTANT_CASE for constants and environment variables, kebab-case for URLs, CSS classes and file names.
- How are acronyms like HTTP handled?
- An acronym followed by a capitalised word is split correctly, so HTTPResponseCode becomes http_response_code and httpResponseCode.
- What does the URL slug do with accents?
- Accents and special letters are converted to plain ASCII, so “Café Münster” becomes cafe-munster, and anything that isn’t a letter, digit or hyphen is removed.
- Does UPPER CASE keep my punctuation?
- No. Every style is built from the words found in the input, so punctuation is removed and words are joined with single spaces: “Hello, world!” becomes HELLO WORLD. The tool is meant for names and identifiers, so change the case in your editor when punctuation has to stay.
- What is Train-Case used for?
- Train-Case capitalises every word and joins them with hyphens. Its best-known use is HTTP header names such as Content-Type, X-Request-Id or Accept-Encoding. Header names are case-insensitive, so this is a convention for readability rather than a requirement of the protocol.
- Is kebab-case the same as a URL slug?
- Almost. Both are lowercase words joined by hyphens, but the URL slug also turns accented letters into plain ASCII and removes anything other than a to z, digits and hyphens. kebab-case keeps letters like é or ł, which is fine for CSS classes but not ideal in a URL.
camelCase vs snake_case vs kebab-case: what’s the difference?
Naming conventions differ only in how they join words. camelCase starts lowercase and capitalises each following word (userProfileId), PascalCase capitalises every word (UserProfileId), snake_case joins lowercase words with underscores (user_profile_id), CONSTANT_CASE does the same in capitals (USER_PROFILE_ID), and kebab-case uses hyphens (user-profile-id). Train-Case, dot.case and path/case follow the same idea with capitalised hyphenated words, dots and slashes.
The language or format usually decides the case, not personal taste. Most programming languages don’t allow hyphens in identifiers, because user-id reads as user minus id, so kebab-case lives in URLs, CSS class names, CLI flags like --dry-run and file names. Dots appear in config keys such as spring.datasource.url and in translation message IDs, while path/case matches folder layouts and nested route names.
How to convert between naming conventions
Converting a name starts with splitting it into words. The case converter splits at spaces, underscores, hyphens, dots, slashes and other punctuation, at a lowercase letter or digit followed by a capital (getUser gives get and user), and inside runs of capitals before a new word (XMLParser gives xml and parser). Every word is lowercased and then joined in each style, so max_retry_count, maxRetryCount and Max Retry Count all give the same results.
Digits stay attached to the letters before them: version2 remains one word, while version2Beta splits into version2 and beta. Letters from any alphabet count as letters, so names in Polish or German keep their accents in every style except the URL slug. Put one name per line to convert a whole list at once, such as database columns that should become TypeScript fields, and copy any style as a block.
Title Case vs sentence case for headings
Title Case capitalises the main words of a heading and keeps short function words lowercase unless they come first or last. The lowercase words here are a, an, and, as, at, but, by, for, in, of, on, or, the, to, vs and via, so “the state of the art” becomes “The State of the Art”. Style guides such as AP and Chicago disagree on details like longer prepositions, so follow your house style if you have one.
Sentence case capitalises only the first word, as in “The state of the art”. Many design systems, including Material Design and the Microsoft Writing Style Guide, prefer sentence case for headings and UI labels because it reads faster and translates better. The case converter lowercases every word before applying a style, so proper nouns and acronyms like API or GitHub need a manual fix after converting to sentence case or Title Case.
Something not working, or a result looks wrong? Report a problem with this tool