Paste or type text to be converted
Choose from lowercase, uppercase, sentence case, or title case
Apply selected case formatting to input text
Copy converted text to clipboard
Text case refers to the capitalization conventions used for writing words and sentences. Common text cases include:
Lowercase: all letters are in lowercase (e.g. "hello world")
Uppercase: all letters are in uppercase (e.g. "HELLO WORLD")
Sentence case: the first letter of a sentence is capitalized (e.g. "Hello world.")
Title case: the first letter of most words are capitalized (e.g. "Hello World")
Consistent use of text cases aids readability and follows standard writing styles for different contexts like titles, headers, prose, etc.
The case conversion algorithm works as follows:
Lowercase: Convert all characters to their lowercase equivalents using the .toLowerCase() string method.
Uppercase: Convert all characters to their uppercase equivalents using the .toUpperCase() string method.
Sentence case: Capitalize the first character of the input string using .charAt(0).toUpperCase() and concatenate it with the remaining characters converted to lowercase using .slice(1).toLowerCase().
Title case: Split the input string into words by the space character. Capitalize the first character of each word except for minor words like "a", "an", "the" using an array of minor words and the .includes() method. Then join the words back into a string with spaces.