case-conversion
Convert between different types of cases (unicode supported)
What it is and what it does
case-conversion is a Python package that converts text between different naming conventions—camelCase, snake_case, kebab-case, PascalCase, CONST_CASE, and many others—without requiring you to specify which format the input is in. It automatically detects the source case, handles acronyms intelligently (so HTTPError stays together rather than splitting on each capital letter), and fully supports Unicode characters including accented letters. The package is dependency-free and works by exposing both a Converter class for fine-grained control and top-level convenience functions for quick conversions.
It originated as a port of a Sublime Text plugin and has been maintained since 2016. The core use case is anywhere you need to normalize or transform identifier names—code generation, API clients, configuration tools, or any system that needs to convert between naming conventions while preserving meaning. You can initialize a Converter with custom acronyms if the built-in detection doesn't match your domain's terminology.
Use it for:
- Generate code or variable names in different languages that use different case conventions (e.g., Python snake_case from camelCase API responses).
- Normalize user input or configuration keys to a canonical case format for comparison or storage.
- Build CLI tools or code generators that output identifiers in the target language's preferred case style.
- Parse and convert between naming conventions in API clients or data transformation pipelines.
- Handle acronyms correctly when converting domain-specific terms (e.g., HTTPError, XMLParser) across case formats.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts strings between any case format (camelCase, snake_case, kebab-case, PascalCase, CONST_CASE, and others) with automatic case detection and acronym awareness, supporting Unicode characters.
Yes. The package is stable (production-rated), has zero dependencies, supports modern Python versions, and solves a common string-manipulation problem cleanly. The MIT license poses no barriers. The only minor note is that it's aging (352 days since last release), but the recent repository activity and lack of open issues suggest it's mature rather than abandoned. Install it if you need case conversion; it's lightweight and reliable.
Install
case-conversion on PyPI
pip
pip install case-conversionuv
uv add case-conversionpoetry
poetry add case-conversionInstalling case-conversion
Before you install
Low friction: zero runtime dependencies, pure Python wheel, supports Python 3.10+. Last commit was recent (2025-08-27), though the package is marked as aging with 352 days since the last release.
License in practice
MIT license (permissive) allows use in most projects without restriction. No license-based barriers to adoption.
Quickstart
pip install case-conversion
from case_conversion import Converter
converter = Converter()
print(converter.camel("FOO_BAR_STRING")) # 'fooBarString'
# Or use convenience functions:
import case_conversion
print(case_conversion.snake("fooBarString")) # 'foo_bar_string'
Requires Python 3.10 or later.
Verify before relying
- Performance characteristics on very large strings or bulk conversions are not documented.
- Whether the acronym detection algorithm handles all edge cases or has known limitations.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 352 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 614,227/month — #5,749 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: case_conversion-3.0.2-py3-none-any.whl
Keywords: camel, case, conversion, convert, kebab, pascal, snake, spinal, unicode
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,000 on PyPI
case-convertConverts strings between different case formats…
copyleft · top 15,000 on PyPI
casefyCasefy converts strings between different…
permissive · top 5,000 on PyPI
textcaseConverts strings between different text case…
permissive · top 15,000 on PyPI
titlecaseConverts text to title case with intelligent…
permissive · top 15,000 on PyPI
boa-strConverts strings to snake_case by normalizing…
permissive · top 5,000 on PyPI
pyhumpsConverts strings and dictionary keys between…
permissive · top 5,000 on PyPI
camel-converterConverts strings and dictionary keys between…
permissive · top 5,000 on PyPI
pyheckConverts strings between case styles…
permissive · top 15,000 on PyPI
humpsConverts strings to camelCase format, handling…
copyleft · top 15,000 on PyPI
vokativConverts Czech given names and surnames into…
permissive · top 15,000 on PyPI