Kebab Case Converter

Convert text to kebab-case format for URLs and CSS

31 characters
kebab-case
convert-this-text-to-kebab-case

Other developer formats

snake_case
convert_this_text_to_kebab_case
camelCase
convertThisTextToKebabCase
PascalCase
ConvertThisTextToKebabCase

What is Kebab Case?

Kebab case (also called dash-case or hyphen-case) is a naming convention where spaces are replaced with hyphens and all letters are lowercase. For example, "my class name" becomes "my-class-name".

It gets its name because the words look like they're skewered on a kebab stick.

When to Use Kebab Case

  • URLs and slugs: Clean, readable URLs like /my-blog-post
  • CSS classes: Standard convention for class names (.my-button)
  • HTML attributes: Custom data attributes (data-user-id)
  • File names: Often used for web assets (my-image.png)
  • Package names: npm packages use kebab-case (lodash-es)

Benefits of Kebab Case

  • URL-safe: Hyphens are valid in URLs without encoding
  • SEO-friendly: Search engines recognize hyphens as word separators
  • Readable: Easy to read at a glance
  • Case-insensitive: Works well across different systems

Kebab Case vs Snake Case

The main difference is the separator character: kebab-case uses hyphens (-) while snake_case uses underscores (_). Choose based on your context:

  • Use kebab-case for URLs, CSS, and HTML
  • Use snake_case for Python, Ruby, and databases

Related Tools