PHPackages                             ghostwriter/case-converter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ghostwriter/case-converter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ghostwriter/case-converter
==========================

Convert strings from and to AdaCase, CamelCase, CobolCase, KebabCase, Lowercase, MacroCase, PascalCase, SentenceCase, SnakeCase, TitleCase, TrainCase, and Uppercase

2.2.0(5mo ago)03.5M—7.3%10BSD-4-ClausePHPPHP ~8.4.0 || ~8.5.0

Since Feb 10Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/ghostwriter/case-converter)[ Packagist](https://packagist.org/packages/ghostwriter/case-converter)[ Docs](https://github.com/ghostwriter/case-converter)[ GitHub Sponsors](https://github.com/sponsors/ghostwriter)[ RSS](/packages/ghostwriter-case-converter/feed)WikiDiscussions 2.2.x Synced 1mo ago

READMEChangelog (4)Dependencies (5)Versions (16)Used By (10)

Case Converter
==============

[](#case-converter)

[![GitHub Sponsors](https://camo.githubusercontent.com/c57a98318cc5057052383a0072dcb50fea276bf02ea22c648be3f53251b9bbc4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73706f6e736f72732f67686f73747772697465723f6c6162656c3d53706f6e736f722b4067686f73747772697465722f636173652d636f6e766572746572266c6f676f3d4769744875622b53706f6e736f7273)](https://github.com/sponsors/ghostwriter)[![Automation](https://github.com/ghostwriter/case-converter/actions/workflows/automation.yml/badge.svg)](https://github.com/ghostwriter/case-converter/actions/workflows/automation.yml)[![Supported PHP Version](https://camo.githubusercontent.com/497a077716e726148bac58c4af185e024195e99846c89225b20cf76e235a4291/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f7068702f67686f73747772697465722f636173652d636f6e7665727465723f636f6c6f723d383839326266)](https://www.php.net/supported-versions)[![Downloads](https://camo.githubusercontent.com/81a1afcf23a60525906e2e66b4153487f6e49c0bcf9e4008ec428c291f036671/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f64742f67686f73747772697465722f636173652d636f6e7665727465723f636f6c6f723d626c7565)](https://packagist.org/packages/ghostwriter/case-converter)

Convert strings from and to `AdaCase`, `CamelCase`, `CobolCase`, `KebabCase`, `Lowercase`, `MacroCase`, `PascalCase`, `SentenceCase`, `SnakeCase`, `TitleCase`, `TrainCase`, and `Uppercase`.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require ghostwriter/case-converter
```

### Star ⭐️ this repo if you find it useful

[](#star-️-this-repo-if-you-find-it-useful)

You can also star (🌟) this repo to find it easier later.

Usage
-----

[](#usage)

```
use GhostWriter\CaseConverter\CaseConverter;

$string = 'The quick, brown fox jumps over the lazy dog.';

// $caseConverter = new CaseConverter();
// or
$caseConverter = CaseConverter::new();

// The_Quick_Brown_Fox_Jumps_Over_The_Lazy_Dog
$caseConverter->toAdaCase($string);

// theQuickBrownFoxJumpsOverTheLazyDog
$caseConverter->toCamelCase($string);

// THE-QUICK-BROWN-FOX-JUMPS-OVER-THE-LAZY-DOG
$caseConverter->toCobolCase($string);

// the.quick.brown.fox.jumps.over.the.lazy.dog
$caseConverter->toDotCase($string);

// the-quick-brown-fox-jumps-over-the-lazy-dog
$caseConverter->toKebabCase($string);

// the quick brown fox jumps over the lazy dog
$caseConverter->toLowerCase($string);

// THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG
$caseConverter->toMacroCase($string);

// TheQuickBrownFoxJumpsOverTheLazyDog
$caseConverter->toPascalCase($string);

// The quick brown fox jumps over the lazy dog
$caseConverter->toSentenceCase($string);

// the_quick_brown_fox_jumps_over_the_lazy_dog
$caseConverter->toSnakeCase($string);

// The Quick Brown Fox Jumps Over The Lazy Dog
$caseConverter->toTitleCase($string);

// The-Quick-Brown-Fox-Jumps-Over-The-Lazy-Dog
$caseConverter->toTrainCase($string);

// THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
$caseConverter->toUpperCase($string);
```

### Credits

[](#credits)

- [Nathanael Esayeas](https://github.com/ghostwriter)
- [All Contributors](https://github.com/ghostwriter/case-converter/contributors)

### Changelog

[](#changelog)

Please see [CHANGELOG.md](./CHANGELOG.md) for more information on what has changed recently.

### License

[](#license)

Please see [LICENSE](./LICENSE) for more information on the license that applies to this project.

### Security

[](#security)

Please see [SECURITY.md](./SECURITY.md) for more information on security disclosure process.

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance81

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~86 days

Recently: every ~30 days

Total

10

Last Release

54d ago

Major Versions

1.0.x-dev → 2.0.02025-02-06

2.3.x-dev → 3.0.x-dev2026-03-25

PHP version history (4 changes)1.0.0PHP ^8.3

2.0.0PHP &gt;=8.4

2.0.x-devPHP ^8.4

2.1.x-devPHP ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1dbb0131801cc451dad9917ab29aa823b25d7eebc9f3875a9d481d109bdb44ee?d=identicon)[ghostwriter](/maintainers/ghostwriter)

---

Top Contributors

[![ghostwriter](https://avatars.githubusercontent.com/u/9754361?v=4)](https://github.com/ghostwriter "ghostwriter (979 commits)")

---

Tags

ada-casecamel-casecase-convertercobol-caseghostwriterkebab-caselower-casemacro-casepascal-casesentence-casesnake-casetitle-casetrain-caseupper-caseghostwritercamel caselower casekebab casesentence casesnake casetitle caseupper casepascal caseAda caseTrain caseCobol caseMacro casecase-converter

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ghostwriter-case-converter/health.svg)

```
[![Health](https://phpackages.com/badges/ghostwriter-case-converter/health.svg)](https://phpackages.com/packages/ghostwriter-case-converter)
```

###  Alternatives

[jawira/case-converter

Convert strings between 13 naming conventions: Snake case, Camel case, Pascal case, Kebab case, Ada case, Train case, Cobol case, Macro case, Upper case, Lower case, Sentence case, Title case and Dot notation.

1746.9M79](/packages/jawira-case-converter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
