JSON Keys to camelCase
Convert all JSON object keys to camelCase. Paste your JSON and get instant results with nested object support.
Why Convert JSON Keys to camelCase?
Most JavaScript and TypeScript codebases follow the camelCase convention for variable and property names. However, APIs built with Python (Django, Flask), Ruby (Rails), or Go often return JSON with snake_case keys like user_first_name or created_at.
Converting these keys to camelCase (userFirstName, createdAt) keeps your frontend code consistent and avoids mixing naming conventions within the same codebase.
How the Conversion Works
The converter handles multiple source formats:
user_name(snake_case) →userNameuser-name(kebab-case) →userNameUserName(PascalCase) →userNameuser.name(dot.case) →userName
Nested objects and arrays of objects are processed recursively — every key at every depth level is converted.
Common Use Cases
- Consuming REST APIs from Python/Ruby backends in a React frontend
- Normalizing third-party API responses before storing in state
- Converting database query results for GraphQL resolvers
- Migrating JSON configuration files between conventions
- Preparing mock data for JavaScript unit tests
JSON Keys to camelCase in Code
In production, you would typically use a library like camelcase-keys (npm) or write a recursive function. This online tool is useful for quick one-off conversions, debugging API responses, or converting sample data without writing code.
FAQ
Does this tool modify JSON values?
No. Only the keys (property names) are converted. All values — strings, numbers, booleans, nulls, nested objects, and arrays — remain unchanged.
What about keys with numbers?
Keys containing numbers are handled correctly. For example, item_2_name becomes item2Name.
Related Tools
Slug Generator
Convert text to URL slugs
URL Slug Generator
Create SEO-friendly URL slugs
Text to Slug
Transform any text into a slug
Kebab Case Converter
Convert text to kebab-case
Slugify Online
Slugify text instantly online
Permalink Generator
Create clean permanent URLs
Snake Case Converter
Convert text to snake_case
CamelCase Converter
Convert text to camelCase
Title Case Converter
Capitalize text in title case
Sentence Case Converter
Convert text to sentence case
Case Converter
Convert text to any case format
Alternating Case
Convert text to aLtErNaTiNg CaSe
PascalCase Converter
Convert text to PascalCase
Dot Case Converter
Convert text to dot.case
Constant Case Converter
Convert text to CONSTANT_CASE
JSON Keys to snake_case
Convert JSON keys to snake_case
WordPress Slug Generator
Generate slugs for WordPress
Blog Slug Generator
Generate slugs for blog posts
Product Slug Generator
Generate slugs for product pages
Plain Text Converter
Strip formatting, clean text
Duplicate Line Remover
Remove duplicate lines from text
Remove Empty Lines
Remove blank lines from text
Sort Lines Alphabetically
Sort text lines A-Z or Z-A
Remove Line Breaks
Join lines into one paragraph