Case Converter
Convert text or identifiers between camelCase, PascalCase, snake_case, kebab-case, UPPERCASE, lowercase, Title Case and Sentence case with one click.
What does the case converter do?
It rewrites text in one of eight styles. Four are text cases that change only capital letters and keep everything else: UPPERCASE, lowercase, Title Case and Sentence case. The other four are identifier cases that split each line into words and join them the way programming languages name things: camelCase, PascalCase, snake_case and kebab-case.
How to use it
- Type or paste text into the Input pane, or load it with File or URL.
- Click the button for the case you want. The result appears in the Output pane; click another button to try a different case on the same input.
- Use Copy, the copy icon in the Output header, or Download to save
converted.txt. Clear empties both panes.
Identifier cases work line by line, so a list of column names or labels, one per line, comes back as a list. Blank lines stay blank.
How words are detected
For the four identifier cases, each line is split into words at these points, then every word is lowercased before being joined again:
- a lowercase letter or digit followed by a capital:
userName→ user, name; - the end of a run of capitals before a capitalised word:
XMLHttpRequest→ xml, http, request; - any space, underscore, hyphen, dot, slash or other punctuation.
Letters followed by digits stay together, so userID2fa becomes user, id2fa. Accented letters are kept as part of words.
Examples
The same four-line input, converted with each identifier case:
First Name
last_name
XMLHttpRequest
userID2fa
| Button | Output, line by line |
|---|---|
| camelCase | firstName, lastName, xmlHttpRequest, userId2fa |
| PascalCase | FirstName, LastName, XmlHttpRequest, UserId2fa |
| snake_case | first_name, last_name, xml_http_request, user_id2fa |
| kebab-case | first-name, last-name, xml-http-request, user-id2fa |
For prose, hello, world. how ARE you? becomes Hello, world. How are you? with Sentence case and Hello, World. How Are You? with Title Case. Punctuation, spacing and line breaks are kept.
Which case to use where
| Case | Typical use |
|---|---|
| camelCase | JavaScript and Java variables and functions; JSON keys in many APIs |
| PascalCase | Class and type names in most languages; React components; C# methods and properties |
| snake_case | Python functions and variables (PEP 8), Ruby, SQL table and column names |
| SCREAMING_SNAKE_CASE | Constants and environment variables, such as DATABASE_URL |
| kebab-case | CSS classes and custom properties, URLs, HTML data-* attributes, command-line flags |
| Title Case / Sentence case | Headings, button labels and menu items in user interfaces |
Conventions often meet at an API boundary: a Python or SQL backend uses snake_case while the JavaScript front end expects camelCase. Rather than renaming fields by hand, most serialisation libraries can translate automatically, for example Jackson’s naming strategies in Java or Pydantic’s alias generators in Python. This tool is handy for working out the names once, for documentation, or for a one-off migration script.
Things to watch for
- Acronyms are not preserved. Words are lowercased before joining, so
XMLHttpRequestbecomesXmlHttpRequestin PascalCase. Some style guides, including Microsoft’s .NET guidelines, prefer that form; others keep acronyms in capitals, which you will need to restore by hand. - Title Case capitalises every word, including and, of and the. Editorial styles such as AP and Chicago keep those lowercase, so check headings that follow one.
- Title and Sentence case lowercase everything first. Names, acronyms and the pronoun I lose their capitals:
NASAbecomesNasa. - Sentence case starts a new sentence after
.,!or?followed by a space, and at the start of every line. An abbreviation such ase.g.therefore capitalises the next word. - Language rules are not applied. UPPERCASE uses the default Unicode mapping:
straßebecomesSTRASSE, and TurkishibecomesIrather thanİ.
Frequently asked questions
What is the difference between camelCase and PascalCase?
Only the first letter. camelCase starts lowercase (orderTotal) and PascalCase starts with a capital (OrderTotal). Many codebases use PascalCase for types and classes and camelCase for values and functions.
How do I get CONSTANT_CASE?
Click snake_case, copy the output into the Input pane, and click UPPERCASE. max retry count becomes max_retry_count and then MAX_RETRY_COUNT.
Why does Title Case not split user_name into two words?
Title Case and Sentence case are for prose, so they keep underscores, hyphens and punctuation as they are. To turn an identifier into a readable label, click snake_case first if needed, replace the underscores with spaces, and then click Title Case.
Can I convert JSON keys or code with this?
Not safely. The tool treats the whole input as words and does not know which parts are keys, values or strings, so converting a JSON document changes its values and punctuation too. Paste just the list of names you want to rename, one per line.
What happens to emoji and non-Latin text?
They are kept. UPPERCASE and lowercase follow Unicode rules for scripts that have case, such as Greek and Cyrillic, and leave others untouched. For identifier cases, word boundaries inside a word are only detected for the ASCII capitals A to Z.
Is my text uploaded?
No. Conversion runs in your browser, and File reads the file locally. The only request the tool makes is when you click URL, and that goes from your browser directly to the address you enter.