webtools

Case Converter

Private: nothing leaves your browser

Nine cases, live

Type or paste something above and every case fills in as you go.

    Paste your text once and get every case at the same time: UPPER, lower, Title, Sentence, camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE. Copy the one you need with a single tap.

    About this case converter

    Retyping a heading because it came in as SHOUTING, or turning a column of labels into database fields, is the sort of job that takes longer than it should. This does all nine conversions on every keystroke, so you can read them side by side and take the one that fits instead of converting, checking, and converting again.

    The conversions are careful about the details. Title Case leaves small words like "of" and "the" lowercase in the middle of a title but capitalises the first and last word, as style guides do. Sentence case capitalises after a full stop but leaves a decimal number alone. The programmer cases work line by line, so pasting a list of twenty names gives you back twenty snake_case names, not one long run.

    An acronym is kept together, which is the detail most converters get wrong. parseJSONFile comes out as parse_json_file and XMLHttpRequest as XML_HTTP_REQUEST, rather than exploding into one letter per underscore, because the splitter breaks a run of capitals only where the last capital starts a new lowercase word. Two limits are worth knowing in the other direction: changing case is not always reversible, since German ß uppercases to SS and has no way back, and Turkish has a dotted and a dotless I that need their own rules no browser applies unless it is asked. For English prose neither bites. And if the kebab-case row is heading for a URL, Text to Slug is the better fit: it also folds accented letters down to plain ASCII and trims the separators off the ends.

    How to change the case of text

    1. Type in the box, or paste text in from anywhere.
    2. Every case below updates as you type. Load sample shows you what each one does.
    3. Press the copy button on the row you want. The full text goes to your clipboard, not just the preview.
    4. Paste a list with one item per line to convert all of them at once.
    5. Press Clear to start again.

    Common questions about changing case

    Which words stay lowercase in Title Case?

    Articles, short conjunctions and short prepositions: a, an, and, as, at, but, by, for, if, in, nor, of, on, or, per, the, to, v, via and vs. They are only left lowercase inside the title. The first and last word always take a capital, which is what the Chicago and AP style guides both ask for.

    What is the difference between camelCase and PascalCase?

    Both join the words with no separator and capitalise each one. PascalCase also capitalises the first word, so you get UserProfile. camelCase leaves the first word lowercase, giving userProfile. By convention JavaScript uses camelCase for variables and PascalCase for classes and components.

    Can it convert an existing camelCase name?

    Yes. Words are split on camel humps as well as on spaces, underscores and hyphens, so parseJSONFile is read as three words and becomes parse_json_file or parse-json-file. That makes it safe to move a name between a JavaScript file, a database column and a CSS class.

    Does it keep my line breaks?

    Yes. Every case is applied one line at a time, so a pasted list stays a list. The preview row shows it on a single line to keep the page tidy, but the copy button gives you the real text with the breaks intact.

    Can I paste in copy that has not been published yet?

    Yes. The conversion is JavaScript running on this page, so your text stays on your own device. Nothing is sent, logged or saved, and every case still updates with your connection switched off, which is the quickest way to prove it to yourself.

    Next

    Related tools

    All Text tools