camelcase

Converts strings to camelCase. Handles hyphen-separated, underscore-separated, space-separated, and mixed case strings. Supports Unicode, locale-aware capitalization, and PascalCase output. Published by Sindre Sorhus — ESM-only since v7. Lightweight zero-dependency utility used across thousands of npm packages.

Evaluated Mar 07, 2026 (0d ago) v8.x
Homepage ↗ Repo ↗ Developer Tools camelcase string case convert pascal-case naming utilities
⚙ Agent Friendliness
66
/ 100
Can an agent use this?
🔒 Security
99
/ 100
Is it safe for agents?
⚡ Reliability
89
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
90
Error Messages
70
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
100
Auth Strength
100
Scope Granularity
100
Dep. Hygiene
95
Secret Handling
100

Zero dependencies, local computation, MIT licensed. No security concerns — pure string transformation.

⚡ Reliability

Uptime/SLA
100
Version Stability
88
Breaking Changes
78
Error Recovery
90
AF Security Reliability

Best When

You specifically need camelCase conversion in an ESM environment and want a focused, zero-dependency utility from a trusted maintainer.

Avoid When

You need multiple case conversions (snake_case, kebab-case, PascalCase, CONSTANT_CASE all in one project) — use change-case instead to avoid managing multiple packages.

Use Cases

  • Convert API response field names from snake_case to camelCase for JavaScript object normalization
  • Transform CLI flag names (--my-flag) to camelCase property names in argument parsers
  • Normalize variable names in agent code generation pipelines when generating JavaScript/TypeScript code
  • Convert configuration keys between different naming conventions when processing YAML/TOML configs
  • Generate camelCase identifiers from natural language strings in code scaffolding tools

Not For

  • Multi-convention string transformations — use the 'change-case' package for all-in-one case conversion (snake, kebab, pascal, constant, etc.)
  • CommonJS environments — v7+ is ESM-only; use v6 for CommonJS or switch to change-case
  • Non-English character handling edge cases — locale-aware options exist but Unicode edge cases may require testing

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Local library — no authentication required. MIT licensed.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT licensed. Zero cost.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • v7+ is ESM-only — CommonJS require() fails; use v6 (camelcase@6) for CommonJS projects or switch to 'change-case' which supports both
  • Array input joins elements: camelCase(['foo', 'bar']) returns 'fooBar' — useful for building identifiers from word arrays
  • pascalCase option converts to PascalCase (UpperCamelCase): { pascalCase: true } — no separate package needed for PascalCase
  • Preserves consecutive uppercase sequences by default — 'XMLParser' stays 'XMLParser', not 'xmlParser'; use { preserveConsecutiveUppercase: false } to normalize
  • Locale-aware option: { locale: 'tr' } uses Turkish/Azerbaijani rules for i/I capitalization — needed for correct multilingual output
  • Does NOT handle all change-case patterns — no snake_case, kebab-case, or CONSTANT_CASE output; install change-case for multi-convention projects

Alternatives

Full Evaluation Report

Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for camelcase.

AI-powered analysis · PDF + markdown · Delivered within 30 minutes

$99

Package Brief

Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.

Delivered within 10 minutes

$3

Score Monitoring

Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.

Continuous monitoring

$3/mo

Scores are editorial opinions as of 2026-03-07.

6470
Packages Evaluated
26150
Need Evaluation
173
Need Re-evaluation
Community Powered