Text Case Converter: Upper, Lower, Title, camelCase
Convert text to UPPER CASE, lower case, Title Case, Sentence case, camelCase, snake_case, kebab-case and more in your browser. Smart small words, Unicode aware. Nothing is uploaded.
0 characters, 0 bytes
0 characters, 0 bytes
About the text case converter
This page converts text between thirteen cases in your browser: UPPER CASE, lower case, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, aLtErNaTiNg, iNVERSE and Random case. Paste or type your text, choose a case, and the converted text appears beside it straight away. It changes again as soon as you edit the text or pick another case, so there is no convert button to press. The tool handles accented letters and non-English alphabets, keeps your line breaks exactly as you typed them, and works on long text as comfortably as on a single word.
How to convert text
Steps
- Type or paste your text into the Input box. The counter underneath shows characters and bytes.
- Choose a case under Case. UPPER CASE is selected when the page opens.
- Read the result in Output. Press Copy to copy it, or Clear to empty the input and start again.
- For Title Case, check the Small words kept in lower case field, which appears only while Title Case is selected.
Privacy
The conversion runs in your browser. Your text is never uploaded to our servers, and it is forgotten when you close or reload the tab.
The thirteen cases
Text cases: upper, lower, title, sentence
These four are for prose. UPPER CASE and lower case change every letter, so Hello World becomes HELLO WORLD or hello world. Title Case capitalises each word except a short list of small words, and Sentence case capitalises only the start of each sentence. Everything that is not a letter, such as digits, punctuation, spacing and line breaks, stays as you typed it. The pages for uppercase, title case and sentence case go into each of these in more detail.
Programming cases: camel, Pascal, snake, kebab, constant, dot
These six turn each line into one identifier. The text is split into words at spaces and punctuation, between a lower-case and a capital letter, around runs of capitals and around numbers, then joined in the chosen style. Hello big world gives helloBigWorld, HelloBigWorld, hello_big_world, hello-big-world, HELLO_BIG_WORLD and hello.big.world. Existing code works too: Hello_World-foo bar becomes helloWorldFooBar in camelCase, and getHTTPResponse2Go becomes get_http_response_2_go in snake_case. Punctuation is treated as a separator and does not appear in the result.
Alternating, inverse and random
aLtErNaTiNg switches between lower and upper case on every letter, counting letters only, so spaces do not shift the pattern: hello world becomes hElLo WoRlD. iNVERSE swaps the case of every letter: Hello World becomes hELLO wORLD. Random case gives each letter an upper or lower case at random, with Randomise again for a new draw and Strictly alternate for an alternating pattern from a random start. All three are mainly used for jokes and mocking text.
Things to know
- Each line is converted on its own. In the programming cases every line becomes a separate identifier, and in Title Case and Sentence case every line starts a fresh title or sentence. Line breaks of every kind, including Windows line endings, are kept as they were.
- Unicode is handled.
straßein UPPER CASE becomesSTRASSE, andÉCOLEin lower case becomesécole. Letters are converted using your browser's locale rules, so a browser set to Turkish treats the letterithe Turkish way. - Title Case is not a style guide. It uses an editable list of small words, not the full rules of AP, Chicago or any other guide, and it lowercases the rest of each word. A name such as
iPhonecomes out asIphoneandNASAasNasa, so check brand names and acronyms by hand. - Sentence case lowercases first. Proper nouns and the pronoun
Iin the middle of a sentence are lowercased too and need fixing by hand. - Empty input gives empty output, with no error message.
Which case for which job
- camelCase and PascalCase for variables, functions and class names in JavaScript, Java, C# and many other languages.
- snake_case for Python and Ruby names, and for database column names.
- kebab-case for CSS class names, HTML attributes and file names. If you need a clean URL from a headline, with accents and symbols removed, the Slug Generator does more of that work.
- CONSTANT_CASE for constants and environment variable names.
- dot.case for configuration keys such as
app.server.port.
Related tools
Once the case is right, other clean-up tools are one step away. Remove stray spaces and blank lines with the Whitespace Remover, flip the order of characters, words or lines with Reverse Text, or put a list in order with the List Sorter. To strip repeated lines after converting a list, use the Duplicate Remover, and to compare the result with the original, paste both into Text Diff.
Frequently asked questions
What is the difference between camelCase and PascalCase?
Both join words without separators and capitalise each word after the first. camelCase starts with a lower-case letter, as in helloBigWorld, and PascalCase starts with a capital, as in HelloBigWorld. Languages and style guides usually reserve PascalCase for class and type names and camelCase for variables and functions.
Can I convert code identifiers such as getHTTPResponse to snake_case?
Yes. The programming cases split a name between a lower-case and a capital letter, around runs of capitals and around numbers, so getHTTPResponse2Go becomes get_http_response_2_go. Punctuation and spaces count as word breaks and are dropped from the result.
Does the converter keep my line breaks?
Yes. Every case works one line at a time and keeps each line break exactly as typed, whether it came from Windows, macOS or Linux. In the programming cases each line becomes its own identifier, and in Title Case and Sentence case each line starts a new title or sentence.
Why does Title Case change iPhone to Iphone?
Title Case lowercases each word before capitalising its first letter, so mixed-case names such as iPhone, eBay and NASA lose their internal capitals. The tool has no dictionary of brands or acronyms, so fix those words by hand after converting, or leave them out of the text you convert.
Are accented letters and non-English text supported?
Yes. Conversion uses the browser's Unicode case rules, so école becomes ÉCOLE and straße becomes STRASSE. Scripts without upper and lower case, such as Chinese or Arabic, pass through unchanged. The browser's language setting can affect a few letters, for example the Turkish dotted and dotless i.