# Case Converter & Line Tools

URL: https://discuvr.org/case-converter/
Last updated: 2026-11-07
MCP tool: `convert_text_case`

Convert text to UPPER, lower, Title or Sentence case, or camelCase, snake_case and kebab-case. Remove duplicate lines, sort lists and trim spaces.

A heading typed with Caps Lock on, a column of names to tidy, a list of emails with repeats. Paste the text, press one button, and copy it back out.

## What it does

- UPPER, lower, Title and Sentence case for any language with capital letters.
- camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE, one line at a time.
- Remove duplicate lines, exactly or ignoring case, keeping the first of each.
- Sort lines A to Z or Z to A, reverse them, drop empty lines or trim spaces.
- Undo the last change with one click.

## How it works

1. Paste your text into the box.
2. Press the case or line action you want.
3. Copy the result, or undo and try another.

## Worked example: column headers to code

Paste a list of spreadsheet headers such as Customer Name, Invoice Date and GST Number, one per line. snake_case gives customer_name, invoice_date and gst_number for a database or Python; camelCase gives customerName, invoiceDate and gstNumber for JavaScript; kebab-case gives customer-name for URLs and CSS. Existing camelCase is split back into words first, so invoiceDate converts cleanly to invoice_date.

## What Title Case does and does not do

Title Case capitalises the first letter of every word and lowers the rest, so it also turns NASA into Nasa and iPhone into Iphone. Style guides that keep short words like of and the lowercase differ from each other, so check headings that will be published. Sentence case lowers everything and capitalises the first letter after a full stop, question mark or exclamation mark, so restore proper nouns by hand.

## Sorting, spaces and language quirks

Sorting ignores case but follows Unicode code points, not dictionary or natural order: item10 comes before item2, and words starting with É or Ö come after Z. Pad numbers (item02) or use your spreadsheet's sort when the order matters. Exact duplicate removal treats "Acme" and "Acme " with a trailing space as different lines, so trim spaces first. Case changes use the standard Unicode mapping, not Turkish rules: i becomes I rather than İ, and ß becomes SS. Title Case gives O'neil and Mcdonald, and Sentence case also capitalises the word after an abbreviation such as e.g.

## Which case for which job: Python, JavaScript and web addresses

Python's official style guide, PEP 8, uses snake_case for function and variable names (invoice_total), CapWords, which this page calls PascalCase, for class names (InvoiceTotal) and capitals with underscores for constants (MAX_ROWS), the CONSTANT_CASE button. JavaScript code usually uses camelCase for variables and functions (invoiceTotal). For web addresses, Google Search Central recommends hyphens rather than underscores between words, so kebab-case suits a page slug: summer-clothing, not summer_clothing. Spreadsheet headers and database columns have no single rule, so pick one style and keep it across the whole file.

## Questions

**How do I remove duplicates from an Excel column?**

Copy the column, paste it here, choose remove duplicates and paste the result back. The first occurrence of each value is kept in its original position. Use the ignore-case option if Acme and ACME should count as the same.

**Does it work with non-English text?**

Yes. Upper, lower, Title and Sentence case follow Unicode rules, so accented letters, Cyrillic and Greek change correctly. Scripts without capital letters, such as Hindi or Chinese, are left unchanged.

**Does removing duplicates change the order?**

No. The first time each line appears is kept in place and later repeats are dropped.

**Why does camelCase treat each line separately?**

So that a pasted list of field or column names stays a list, with each name converted on its own.

**How are acronyms such as HTTP or IPv6 split?**

A run of capitals followed by a capitalised word is split before that word, so getHTTPResponse becomes get_http_response and HTTPServer becomes http_server. The acronym is then written like any other word, so PascalCase gives HttpServer, while PEP 8 prefers HTTPServer for Python class names: fix those by hand. Words are also split at every lowercase-to-capital change, so IPv6 Address becomes i_pv6_address; type it as Ipv6 Address to get ipv6_address.

**Is my text stored?**

No. It is converted and returned in the same request and never written to a database or log.

**Which Excel or Google Sheets formulas do the same job?**

UPPER(A1) and LOWER(A1) match the UPPER CASE and lower case buttons. PROPER(A1) is close to Title Case but also capitalises a letter that follows an apostrophe or a digit: PROPER gives O'Neil and 76Budget, while Title Case here gives O'neil and 76budget. There is no sentence-case function; for a cell holding one sentence, =UPPER(LEFT(A1))&LOWER(MID(A1,2,LEN(A1))) does it. TRIM(A1) removes spaces at both ends and also squeezes runs of spaces inside the text to one, while Trim spaces here only removes them at the start and end of each line. Excel's TRIM does not remove the non-breaking space (character 160) that text copied from a web page often carries; Trim spaces here does, at the ends of a line.

**How do I change text case in Word or Google Docs?**

In Word, select the text and press Shift+F3 (fn+Shift+F3 on many Mac keyboards) to cycle through lowercase, UPPERCASE and Capitalize Each Word, or use the Change Case button (Aa) on the Home tab, which also offers Sentence case. In Google Docs, select the text and choose Format > Text > Capitalization, then lowercase, UPPERCASE or Title Case. Neither has camelCase, snake_case or duplicate-line removal. Use this page for those, or for text that is not in a document, such as a spreadsheet column, an email or code: paste it, press the button and copy it back. It works on plain text, so bold, links and other formatting do not come through.

**How do I fix text typed with Caps Lock on?**

Paste it and press Sentence case. Everything is lowered first, then the first letter of each line and of each word after a full stop, question mark or exclamation mark is capitalised, so tHANK YOU. sEE YOU ON MONDAY! becomes Thank you. See you on monday! Names, days and acronyms such as Monday or GST come back lowercase, so fix those by hand. For a list of names or headings, one per line, press Title Case instead: jOHN sMITH becomes John Smith. If the result is wrong, Undo restores the text you pasted.

**How do I clean up a pasted list of emails or names?**

Press the buttons in this order, because each one works on the result of the last: Trim spaces, then Remove empty lines, then Remove duplicates (ignore case), then Sort A to Z if you want it sorted. Trimming first matters: ravi@example.com with a trailing space is not an exact match for ravi@example.com. Ignoring case treats anna@example.com and Anna@example.com as one line and keeps whichever comes first. After each step the tool shows how many lines it removed. Email domains are not case-sensitive; the part before the @ may be under RFC 5321, although the large email providers ignore case.

## More in Office & Data

- [Text Compare](https://discuvr.org/text-diff/)
- [CSV to Excel](https://discuvr.org/csv-to-excel/)
- [Sign PDF](https://discuvr.org/sign-pdf/)
- [Redact](https://discuvr.org/redact/)

## Often used with

- [Word Counter & Readability Analyzer](https://discuvr.org/word-counter/)

---

Part of Discuvr (https://discuvr.org/): Discuvr is a collection of free, focused tools for day-to-day professional work - office and data utilities, legal and compliance helpers, privacy and security checks, and developer formatters. Every tool has its own page, and most can also be called from ChatGPT or Claude over MCP.
