getwordcount.com

kebab-case Converter

Convert text to kebab-case with hyphens.

Copied to clipboard

This kebab-case converter lowercases your text and joins the words with hyphens — turning Main Nav Item into main-nav-item. It is the style used for URL slugs, CSS class names and HTML attributes.

How to use the kebab-case converter

  1. Paste a phrase or an identifier in any case.
  2. The kebab-case version appears instantly.
  3. Copy it into your CSS, HTML or URL.

What is kebab-case?

kebab-case — also called dash-case — writes lowercase words joined by hyphens, like main-nav-item. The name comes from the words looking skewered on a stick. Hyphens are the safe, readable separator for anything that appears in a URL or CSS, which is why it dominates class names, custom HTML attributes and file names on the web.

Examples

Inputkebab-case
Main Nav Itemmain-nav-item
primaryButtonColorprimary-button-color
hero_section_titlehero-section-title

Frequently asked questions

Is kebab-case good for URLs?

Yes. Hyphenated lowercase slugs are the recommended format for readable, SEO-friendly URLs. For full titles, the Slug Generator also strips accents and punctuation.

Why not use underscores in URLs?

Search engines treat hyphens as word separators but not always underscores, so kebab-case is the safer choice for links.

Where is kebab-case used?

CSS class names, HTML data attributes, URL slugs, and file names on the web.

Related tools