# Text Case Converter - camelCase, snake\_case & 7 More (`eliai/text-case-converter`) Actor

Round-trip case conversion done right: camelCase, PascalCase, snake\_case, kebab, CONSTANT\_CASE, Title, Sentence, dot.case, slug — with correct acronym splitting (parseHTMLParserOutput -> parse\_html\_parser\_output). 200 texts/run. $0.0004 per text all nine cases; junk never charged.

- **URL**: https://apify.com/eliai/text-case-converter.md
- **Developed by:** [Broke to Built](https://apify.com/eliai) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.32 / 1,000 converted texts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Text Case Converter — camelCase, snake\_case & 7 More, Round-Trip Correct

Convert identifiers and phrases between all nine developer cases at once: **camelCase, PascalCase, snake\_case, kebab-case, CONSTANT\_CASE, Title Case, Sentence case, dot.case, slug**. The part naive converters get wrong is the split: this one handles camelCase boundaries AND acronym runs correctly — `parseHTMLParserOutput` splits to `parse html parser output`, not `parse h t m l...`. Up to 200 texts per run, online, by API, or as an agent tool via Apify MCP.

Renaming API fields, generating code from schemas, migrating a codebase's naming convention, normalizing CSV headers — all reduce to reliable case round-trips at scale.

### What you get

- All 9 cases per input (or just one via `targetCase`)
- Correct tokenization: camel boundaries, acronym runs (`HTMLParser` → `HTML` + `Parser`), mixed delimiters (`user_profile-settings.page` splits on all of them)
- **Fail-soft honesty**: an unknown `targetCase` is a guidance record listing the valid set — never a silent "here's everything instead"; tokenless input is `{ok: false}` — both **never charged**.

### Input

```json
{ "texts": ["user profile settings", "parseHTMLParserOutput"], "targetCase": "snake" }
```

Omit `targetCase` for all nine. Aliases accepted (`kebab`, `dash`, `screaming-snake-case`...).

### Output (real run)

```json
{
  "input": "parseHTMLParserOutput",
  "ok": true,
  "camelCase": "parseHtmlParserOutput",
  "PascalCase": "ParseHtmlParserOutput",
  "snake_case": "parse_html_parser_output",
  "kebabCase": "parse-html-parser-output",
  "CONSTANT_CASE": "PARSE_HTML_PARSER_OUTPUT",
  "titleCase": "Parse Html Parser Output",
  "sentenceCase": "Parse html parser output",
  "dotCase": "parse.html.parser.output",
  "slug": "parse-html-parser-output"
}
```

Every one of those values is asserted exactly by our release test.

### Pricing

**$0.0004 per text converted** — all nine cases included. Tokenless inputs and unknown target cases are never charged.

No direct paid case-converter incumbent was found on the store (2026-08-07 search — results are file/OCR converters). Pricing is the cost-plus floor of our ladder, stated plainly.

### Honest limits

- ASCII-oriented tokenization (letters/digits); accented identifiers work but aren't transliterated — for URL slugs from natural-language titles with diacritics, use our sibling [Slug Generator](https://apify.com/eliai/slug-generator), which owns transliteration + collision dedupe. This tool owns identifier casing round-trips.
- Acronym recomposition follows the standard convention: `HTML` becomes `Html` in camel/Pascal (`parseHtmlParserOutput`) — the same choice most style guides and code generators make.
- Title Case is simple capitalization (no small-word rules like "of"/"the" lowercase — those are editorial style, not identifier casing).

### FAQ

**What's the difference from the Slug Generator?**
Different problems: this converts BETWEEN developer cases with round-trip-correct splitting; the slug tool produces URL-safe slugs from natural language with Unicode transliteration. `slug` here is a convenience field for ASCII identifiers.

**How are acronyms handled?**
`HTMLParser` splits as `HTML` + `Parser` (the consecutive-capitals rule); recomposed camel is `htmlParser`. Asserted in the release test.

**Can I batch a whole schema's field names?**
Yes — up to 200 per run, one record each; pass `targetCase` to get exactly the field you're migrating to.

**What inputs does it split on?**
Spaces, underscores, hyphens, dots, any punctuation, plus camel boundaries — mixed-delimiter inputs like `user_profile-settings.page` normalize cleanly.

**Why did some rows come back `ok: false`?**
No convertible words (symbols only), or you asked for a case that doesn't exist (the error lists the valid nine). Never charged.

### Use from code or AI agents

```bash
curl -s "https://api.apify.com/v2/acts/EliAI~text-case-converter/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -X POST -H 'Content-Type: application/json' \
  -d '{"texts": ["first_name", "lastName", "EMAIL_ADDRESS"], "targetCase": "camel"}'
```

Agents: connect [Apify MCP](https://mcp.apify.com) and call the `EliAI/text-case-converter` tool.

- **Capability:** round-trip case conversion between 9 developer cases with correct camel/acronym splitting
- **Required input:** `text` (string) or `texts` (array); optional `targetCase`
- **Returns:** one record per text with all (or the one requested) case forms
- **Bounded:** 200 texts per run; failures isolate per text
- **Side effects:** none

# Actor input Schema

## `text` (type: `string`):

A single text or identifier to convert across naming cases. Use this for one-off conversions.

## `texts` (type: `array`):

An array of texts/identifiers to convert in one run. Each item is converted independently.

## `targetCase` (type: `string`):

Return only this one case. Leave empty to return all cases.

## `maxTexts` (type: `integer`):

Safety cap on how many texts to process in a single run.

## Actor input object example

```json
{
  "text": "getUserProfileData",
  "texts": [],
  "targetCase": "",
  "maxTexts": 50
}
```

# Actor output Schema

## `results` (type: `string`):

Every item this run produced, as JSON.

## `resultsCsv` (type: `string`):

The same items as a spreadsheet-ready CSV.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "text": "getUserProfileData"
};

// Run the Actor and wait for it to finish
const run = await client.actor("eliai/text-case-converter").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "text": "getUserProfileData" }

# Run the Actor and wait for it to finish
run = client.actor("eliai/text-case-converter").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "text": "getUserProfileData"
}' |
apify call eliai/text-case-converter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eliai/text-case-converter"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/YnivUp8uZq3hM2xAq/builds/5eS7N8fSKmY2Cg6YZ/openapi.json
