Convert snake_case to kebab-case
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.
user_name created_at profile_image_url api_key
user-name created-at profile-image-url api-key
Try it with your own data
How to convert snake_case to kebab-case
- Split the identifier on each underscore (user_name → user, name).
- Lowercase every word (snake_case is usually already lowercase).
- Join the words with hyphens.
Frequently asked questions
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.
How does the converter know where words start and end?
It splits on separators (underscores, hyphens, spaces) and on lowercase-to-uppercase boundaries, keeping acronym runs together — so HTTPServerError splits into HTTP, Server, Error regardless of the input convention.
Can I convert many identifiers at once?
Yes — put one identifier or phrase per line and every output format converts the whole list, ready to copy as a block.