Writing, Editing, and Developer Utility

Text Case Converter & Cleanup Tool UPPERCASE, Title Case, camelCase, snake_case, URL Slug, and More

Convert case, clean whitespace, strip HTML tags, remove duplicate lines, and build URL slugs from any block of text. Everything runs in your browser.

Last Updated: 27 October 2026

Convert and clean your text

Paste any text, then apply a case transformation or a cleanup action. Counters update as you type.

Your Text
0 words · 0 characters · 0 lines
Case Conversions
Cleanup Actions

Your transformed text
—
The result is shown below. Copy it when you are ready.
Input words0Before the transformation
Output words0After the transformation
Action—Last transformation
What changed

—

Transformed output

Text checks

Input has been provided—
Output has been generated—
Input and output differ—
Result is under 100,000 characters—

Optional AI insight

A short written read on the transformation you applied and one practical note on where this result is likely to be used. Only anonymous counts leave your browser when you press the button.

What this tool does

This tool changes the capitalisation of text and cleans up the formatting problems that accumulate when content is copied from one place to another. It handles the two families of work in one place. The case conversions are UPPERCASE, lowercase, Title Case, sentence case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, and URL slug. The cleanup actions are remove extra spaces, remove line breaks, strip HTML tags, remove duplicate lines, trim line edges, and sort lines alphabetically.

Everything runs inside the browser. The transformations use the standard string methods that every modern browser already has, and there is no server behind the page. Nothing you paste is uploaded, nothing is logged, and the output disappears when you close the tab. If the AI insight button is pressed, only anonymous counts are sent to a small serverless function that runs once and then stops. The word count, character count, line count, and the name of the last action are shared. The actual text is never included.

The tool is deliberately predictable. It does not try to infer a brand's preferred capitalisation, does not correct spelling, does not translate, and does not restructure sentences. Every action produces a specific, explainable change that you can describe to a colleague or reproduce in code.

Every case conversion explained

Each conversion is designed for a specific destination. Choosing the wrong one for the wrong context creates work for whoever reviews the output, so the table below maps each conversion to the place it belongs.

ConversionExampleTypical use
UPPERCASECUSTOMER ACCOUNTLabels, codes, warnings, sheet headers
lowercasecustomer accountTags, email normalisation, search terms
Title CaseCustomer AccountBook titles, headlines, film names
Sentence caseCustomer accountNews, blogs, CMS copy
camelCasecustomerAccountJS variables, JSON keys
PascalCaseCustomerAccountReact components, class names
snake_casecustomer_accountPython, SQL columns, environment keys in some stacks
kebab-casecustomer-accountCSS classes, Vue routes, CLI flags
CONSTANT_CASECUSTOMER_ACCOUNTEnvironment variables, constants
URL slugcustomer-accountPage paths, article URLs, hashtags

UPPERCASE is the strongest visual change, and it works best for short labels. Full sentences in UPPERCASE are harder to read because the eye loses the word shape that lowercase letters provide, and most accessibility guidance discourages long runs of capital letters for that reason. lowercase is useful when you need to normalise data that arrives from a form or a spreadsheet, where capitalisation is inconsistent by default. Title Case and sentence case are the two professional editorial styles and are described in the next section.

Title Case vs sentence case

Title Case capitalises the first letter of most words. It is the traditional style for book titles, article headlines, film names, song titles, and some marketing materials. Most Title Case implementations keep short connecting words lowercase, including articles such as a, an, and the; short prepositions such as of, in, on, at, by, and for; and coordinating conjunctions such as and, or, and but. The first and last words of a title are always capitalised regardless of length.

Sentence case capitalises only the first letter of the sentence and any proper nouns. It is the standard style at most newspapers, most modern websites, most content management systems, and most style guides published in the last decade, including the Associated Press Stylebook and the Microsoft Writing Style Guide. The reasoning is practical: sentence case is faster to read because the eye is trained on it from ordinary prose, and it is easier to apply consistently because the rules are smaller.

A simple rule. If the destination is a newspaper, a blog, a documentation site, or a CMS, use sentence case. If the destination is a book, a film, a song, or a formal academic title, use Title Case. When in doubt, follow the style guide of the organisation that will publish the content, and use the same convention throughout the piece.

Identifiers for developers

The identifier conversions exist because programming languages and data formats have strong naming conventions, and mismatched names create confusion in version control and in code review. JavaScript, TypeScript, Java, and Kotlin conventionally use camelCase for variables and function names and PascalCase for classes and component names. Python, Ruby, and Rust conventionally use snake_case for variables and functions. CSS uses kebab-case for class names and custom properties. Environment variables in most shells and continuous integration systems use CONSTANT_CASE.

There is one important limitation to understand before you run these conversions on source code. The tool does not parse the language, so it cannot tell the difference between an identifier, a string literal, a comment, and a reserved word. If you convert a file that contains the string "user login" inside a quotation mark, the conversion will change that string along with everything else. The safe workflow is to convert identifiers in the source one at a time, or to run the conversion on a plain list of labels and paste the result back into the code editor by hand.

URL slugs and SEO

A URL slug is the human-readable part of a web address after the domain, such as text-case-converter-cleanup in https://afriwidget.com/text-case-converter-cleanup. A good slug is short, descriptive, lowercase, and uses hyphens to separate words. Search engines treat hyphens as word separators, which is why customer-account is more readable to a crawler than customer_account or customeraccount.

Three practical rules matter for slugs. First, keep the slug stable. Once a URL is published and indexed, changing the slug without a redirect breaks every incoming link, every bookmark, and every mention on social media. Second, avoid stop words that add length without meaning. A slug such as the-best-guide-to-unit-conversion is longer and weaker than unit-conversion-guide. Third, do not stuff keywords. Modern search engines look at the whole page and the links pointing to it, not just the slug, and a keyword-stuffed slug reads awkwardly when it is shared.

This tool's URL slug conversion strips accents by default because most content management systems and static site builders prefer an ASCII slug for compatibility. If you are publishing in a language that uses accented characters, confirm the slug the CMS produces before you commit to the URL, because some platforms handle Unicode slugs differently.

Cleanup actions in detail

Cleanup actions solve the problems that accumulate when text moves between formats. Each one is a small, predictable transformation that you can run in any order, though the sequence suggested on the page is chosen to avoid surprises.

Remove extra spaces turns runs of two or more spaces or tabs into a single space and trims the start and end of every line. It is the first cleanup action to run on any text that came from a PDF, a spreadsheet, or a copy-paste from a web page, because those sources often introduce double spaces after full stops and stray tabs that are hard to see.

Remove line breaks joins every line into a single continuous string. It is useful for recovering a paragraph from text that was copied out of a narrow column, a PDF, or a terminal window where the editor wrapped every eighty characters. Use it with care on lists, because it will flatten a bulleted list into one long line.

Strip HTML tags removes opening tags, closing tags, self-closing tags, and HTML comments, and decodes the most common entities such as &, <, and > back into their plain characters. It does not execute scripts, does not render the markup, and does not fetch external resources. It is a text extractor, not a browser.

Remove duplicate lines keeps the first occurrence of each exact line and drops the rest. Two lines that look identical but have different trailing whitespace, different casing, or different punctuation are treated as distinct. Run the space cleanup first to remove trailing whitespace, and run a case conversion before the deduplication if you want the comparison to be case-insensitive.

Trim line edges removes leading and trailing whitespace on every line but leaves the inner spacing untouched. This is useful before you deduplicate a list, because the most common reason for a false duplicate is an invisible trailing space.

Sort lines A to Z reorders the lines alphabetically. It is helpful for turning a scattered list into a reference sheet, for sorting a glossary, or for checking whether a list has duplicates that differ only in placement.

A reliable editing sequence

When you are working with a long list, follow the same order every time. First, keep the original in another tab or a text file. Second, strip HTML tags if the source came from markup. Third, remove line breaks if the source came from a narrow PDF or a terminal window. Fourth, run the space cleanup so that every line has consistent spacing. Fifth, trim the line edges if you plan to deduplicate, so that invisible whitespace does not create false duplicates. Sixth, run the deduplication. Seventh, apply the case conversion last, because converting case first can make it harder to compare the original values against the source.

For code and data imports, inspect a few samples after every step so that meaningful punctuation, identifiers, and blank lines are not lost. The tool's output is plain text, and it does not guess at structure. A blank line that was separating two sections in the source is preserved unless you remove line breaks, and a leading space inside a code block is preserved unless you trim line edges.

Common mistakes

Assuming Title Case knows proper nouns. The conversion applies a general rule and cannot tell that iPhone, eBay, and PowerPoint use internal capitals, or that NASA and UNESCO are acronyms. Proofread the output for names that have a specific capitalisation on the brand's own website.

Deduplicating before removing spaces. Two lines that look the same but differ in a trailing space are treated as unique. Run the space cleanup first, or the duplicate removal will miss matches.

Converting source code without inspecting the result. The tool does not parse the language, so string literals and comments are converted along with identifiers. Read the output before you commit a change to version control.

Changing a published URL slug. Once a slug is live and indexed, changing it without a redirect breaks every incoming link. If you must change a slug, set up a 301 redirect from the old URL to the new one and update any internal links that pointed to the old address.

Using UPPERCASE for long text. Full paragraphs in capital letters are harder to read and are flagged by most accessibility checkers. Reserve UPPERCASE for short labels and warnings.

Stripping HTML from untrusted content. The strip action removes tags but does not sanitise the content. If you then paste the result into a system that re-interprets markup, previously escaped characters can become active again. Treat the output as plain text and check the destination's handling before you publish.

Assuming the tool checks grammar. None of the transformations verify spelling or grammar. They change capitalisation and remove whitespace. A sentence that reads badly before the transformation will read badly after it.

Where this tool stops

This converter applies deterministic text transformations. It does not check spelling, grammar, or sentence structure. It does not know the brand conventions of a specific company. It does not parse programming languages or markup beyond the surface pattern of HTML tags. It does not translate between languages. It does not infer a canonical slug from a headline; it produces a slug from whatever string you give it, and the URL you publish is your decision, not the tool's.

It also does not store your text. The page is a static file, and every transformation runs locally. If you paste content that is confidential, legally protected, or subject to a non-disclosure agreement, treat the tab like any other open document on your device. The tool cannot leak your content, but it also cannot protect a shared screen.

What the tool does give you is a fast, transparent, private way to convert case, clean up whitespace, strip markup, deduplicate a list, and build a URL slug without installing anything or creating an account. Used together with the sequence above and a final read-through, it is a practical starting point for anyone who edits, publishes, codes, or manages content.

Sources

  1. Unicode Consortium. Unicode Standard, Annex 11: East Asian Width and Case Mapping.unicode.org
  2. W3C. HTML Living Standard.html.spec.whatwg.org
  3. Google Search Central. URL structure and slug best practices.developers.google.com
  4. IETF. RFC 3986 – Uniform Resource Identifier (URI): Generic Syntax.rfc-editor.org
  5. ECMA International. ECMAScript Language Specification, String.prototype methods.tc39.es
  6. Unicode CLDR. Common Locale Data Repository, case mapping data.cldr.unicode.org

Frequently asked questions

What is a text case converter?

A text case converter is a tool that changes the capitalisation of text without changing the words themselves. It can turn a sentence into UPPERCASE, lowercase, Title Case, sentence case, camelCase, snake_case, kebab-case, or URL slug. Writers, editors, developers, and marketers use these transformations to normalise copied text, build identifiers, clean headings, and prepare slugs before publishing a page. This tool applies the transformation locally in your browser, so nothing is uploaded.

What is the difference between Title Case and sentence case?

Title Case capitalises the first letter of most words, which is the convention for book titles, article headlines, and film names in many style guides. Sentence case capitalises only the first letter of the sentence and any proper nouns, which is the standard style for most newspapers, most modern websites, and most content management systems. Style guides differ on which small words to keep lowercase in Title Case. Common short words such as a, an, the, of, and, and for are usually lowercased unless they are the first or last word of the title.

What is camelCase and where is it used?

camelCase joins words without spaces and capitalises the first letter of each word after the first. For example, the phrase customer account number becomes customerAccountNumber. It is the standard naming convention in JavaScript, Java, and Kotlin for variables and functions, and it appears in JSON keys, API field names, and some spreadsheet columns. Variants exist: PascalCase capitalises the first word as well, and CONSTANT_CASE uses uppercase words separated by underscores.

What is a URL slug and why does it matter?

A URL slug is the part of a web address after the domain that identifies the page, such as text-case-converter-cleanup in https://afriwidget.com/text-case-converter-cleanup. A good slug is short, descriptive, lowercase, and uses hyphens rather than underscores or spaces. Search engines and browsers treat hyphens as word separators in a URL, while underscores and percent-encoded spaces are less readable. Slugs should be stable once published, because changing a slug without a redirect breaks every incoming link to the page.

Does the case converter change the actual words?

No. All case transformations leave the letters, numbers, and most punctuation in place and only change capitalisation. The one exception is camelCase, snake_case, kebab-case, and URL slug, which replace spaces and some punctuation with a separator character and may strip accents or quotes depending on the transformation. If you need the exact original wording preserved character for character, use the case conversions only and leave the identifier conversions for when you actually need an identifier.

How does Remove Duplicate Lines work?

Remove Duplicate Lines compares each line to the ones above it and keeps only the first occurrence of each exact string. Two lines that look the same but have different trailing spaces, different capitalisation, or different punctuation are treated as different and both kept. That is why the recommended sequence is to run Remove Extra Spaces first, then apply a case conversion if you want case-insensitive deduplication, and then run Remove Duplicate Lines last.

What does Strip HTML Tags do?

Strip HTML Tags removes anything that looks like an HTML element, including opening tags, closing tags, and comments, and leaves the visible text content behind. It also decodes the most common HTML entities, such as ampersand-amp, less-than-lt, and greater-than-gt, back into their plain character form. The tool does not execute any script, does not fetch external resources, and does not render the markup. It is a plain-text extractor, not a browser, and it is intended for cleaning small fragments rather than for parsing an entire page.

Will the tool preserve accents and non-Latin scripts?

Yes for the case conversions. UPPERCASE, lowercase, Title Case, and sentence case all use the browser's own Unicode-aware case mapping, so accented letters in French, Spanish, Portuguese, and other Latin-script languages convert correctly. Non-Latin scripts such as Arabic, Chinese, Japanese, and Korean do not have a case distinction, so those scripts pass through unchanged. The URL slug conversion, however, does strip accents by design, because most CMS platforms prefer an ASCII slug, and you should confirm the result before publishing.

Is my text sent to a server?

No. Every transformation runs inside your browser using the standard JavaScript string methods. The text you paste is never transmitted to any server, and nothing is stored. The page is a static file, so there is no database behind it. If you press the AI insight button, only anonymous counts are sent to a small serverless function that runs once and then stops. The word count, the character count, the line count, and the action label are shared, but the actual text never leaves your device.

Can I use this for code and data files?

Yes, with care. The identifier conversions such as camelCase, snake_case, and CONSTANT_CASE are designed for field names, keys, and labels. For source code files, the safest workflow is to convert a small sample first, inspect the output, and confirm that reserved words, acronyms, and quoted strings have not been accidentally modified. The tool does not parse the language, so it cannot tell an identifier from a string literal. Read the output before you commit a change to version control.

Explore more productivity and writing tools

Alongside this case converter, there are utilities for word counting, Markdown conversion, reading time, and URL slugs. All free, all private, all running in your browser.

See all productivity tools