# Convert snake_case to kebab-case

> Convert snake_case to kebab-case online. Free converter for turning code identifiers into URL slugs and CSS class names, with a live tool.

Database columns and Python identifiers use snake_case; URLs, CSS classes, and CLI flags use kebab-case. Converting between them is a straight swap of underscores for hyphens — this tool does it line by line so you can convert a whole list of identifiers at once.

## Example: snake_case → kebab-case

Input:
```
user_name
created_at
profile_image_url
api_key
```

Output:
```
user-name
created-at
profile-image-url
api-key
```

## How to convert snake_case to kebab-case

1. Split the identifier on each underscore (user_name → user, name).
2. Lowercase every word (snake_case is usually already lowercase).
3. Join the words with hyphens.

## FAQ

### When would I convert snake_case to kebab-case?

Common cases: turning database column names into URL routes, generating CSS class names from API fields, or converting config keys into CLI flags (--api-key).

### Can I go the other way?

Yes — kebab-case to snake_case is the same word split joined with underscores instead. Use the kebab-case to snake_case converter for that direction.

## Related converters

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

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