Convert to kebab-case

Convert text into kebab-case for URL slugs, CSS class names and HTML data attributes.

Convert any text to kebab-case for URLs, CSS classes and HTML attributes. Free developer tool.

Convert to kebab-case examples

InputOutput
Order Total Priceorder-total-price

How the convert to kebab-case works

  1. Split into words at any separator.
  2. Lowercase every word.
  3. Join with hyphens.

Rules and edge cases

  • The output is lowercase words joined by single hyphens, safe for file names, CSS classes and URL paths.
  • camelCase and snake_case input are both split correctly before rejoining.
  • No leading, trailing or doubled hyphens are ever produced.
  • The slug generator additionally transliterates accented characters to ASCII, which matters for public URLs.

Frequently asked questions

Is kebab-case the same as a URL slug?

Nearly. A slug also removes accents and non-Latin characters so the URL needs no percent-encoding — use the slug generator when the text contains é, ø or non-Latin script.

Can I convert a list of headings into file names?

Yes. Paste one heading per line and each becomes its own hyphenated file name.