devkult_
tools26converters34
home/convert/snake-to-kebab

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.

Example · snake_casekebab-case
snake_case input
user_name
created_at
profile_image_url
api_key
kebab-case output
user-name
created-at
profile-image-url
api-key

Try it with your own data

Loading tool…

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.

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.

Related converters