ToolBench

Text

Case Converter

Eight conversions covering both editing and code naming: readable title case for headings, camelCase and snake_case for identifiers, kebab-case for URLs.

Conversions run in place, so you can chain them.

How to use it

  1. Paste your text into the box.
  2. Click a conversion — the text is replaced in place, so you can chain them.
  3. Press Copy to take the result away.

Naming conventions and where each one belongs

camelCase for variables and functions in JavaScript and Java; PascalCase for types, classes and React components; snake_case for Python and SQL column names; kebab-case for CSS classes, URLs and HTML attributes. The rule is not decorative. It is that a reader should be able to tell what kind of thing a name refers to from its shape alone, before reading the word.

The acronym problem

Converting “user ID” naively produces userID, userId or user_id depending on the algorithm, and all three appear in real codebases. Most style guides prefer userId, because a run of capitals is harder to scan than a capital followed by lowercase. The important thing is to decide once — whether APIURL becomes apiUrl or apiURL — and apply it everywhere. Inconsistency is worse than either choice.

Cleaning a column of inconsistent labels

The usual job is a spreadsheet where the same field arrived in four shapes over two years: First Name, first_name, FIRSTNAME and one stray Firstname. Convert the whole column to one case first, then fix word boundaries — case conversion normalises the shape, not the spacing, and spacing is where the mismatches actually hide.

Watch for names with internal capitals (McDonald, iPhone, eBay). Any bulk conversion will flatten them, so either exclude those rows or run a correction pass afterwards. The same applies to product codes, where the capitalisation is part of the identifier rather than a style choice.

Frequently asked questions

Title case vs sentence case?

Title case capitalises the first letter of every word, which suits headings. Sentence case capitalises only the first word, the modern style for UI labels.

Why does snake_case strip punctuation?

Because it targets identifiers and URLs, where everything that is not a letter or digit becomes a single separator.

Is url-slug the same as kebab-case?

Effectively yes — lowercase words joined by hyphens, which is what search engines expect in a URL.

Does converting change accented letters?

It preserves them: Écoute becomes écoute, not ecoute. Stripping accents is a separate operation, and it changes meaning in French, Turkish and Vietnamese.

Why did my identifier get split wrongly?

Because the converter has to guess word boundaries from capitals and underscores. APIKey could be api_key or apikey; supply the separator explicitly if the result is wrong.