# Convert kebab-case to camelCase

> Convert kebab-case to camelCase online. Free converter for turning CSS property names and slugs into JavaScript identifiers, with a live tool.

Turning CSS property names, data attributes, or URL slugs into JavaScript identifiers means converting kebab-case to camelCase — the same mapping the DOM applies when data-user-id becomes dataset.userId. This converter splits on hyphens and capitalizes every word after the first.

## Example: kebab-case → camelCase

Input:
```
background-color
margin-top
user-profile-card
http-request
```

Output:
```
backgroundColor
marginTop
userProfileCard
httpRequest
```

## How to convert kebab-case to camelCase

1. Split the identifier on each hyphen (background-color → background, color).
2. Lowercase the first word and capitalize the first letter of every following word.
3. Join the words back together with no separator.

## FAQ

### Where does this conversion happen automatically?

The browser does it for you in two places: CSS properties in JavaScript (background-color → el.style.backgroundColor) and data attributes (data-user-id → el.dataset.userId).

### Does the converter handle mixed input?

Yes — the splitter understands hyphens, underscores, spaces, and existing capital-letter boundaries, so you can paste a mixed list and every line converts correctly.

## Related converters

- [camelCase → kebab-case](https://www.devkult.com/convert/camel-to-kebab.md)
- [snake_case → camelCase](https://www.devkult.com/convert/snake-to-camel.md)
- [kebab-case → snake_case](https://www.devkult.com/convert/kebab-to-snake.md)

Open the interactive converter: https://www.devkult.com/convert/kebab-to-camel