kebab-case converter

Turn phrases and other naming styles into kebab-case: lowercase words joined by hyphens, as used in CSS classes, HTML attributes and file names. Conversion happens in your browser and nothing is uploaded.

How it works

  1. Paste your text

    Type or paste the text in the left box, or open a .txt file. No text to hand? Click Example.

  2. Instant result

    The result appears as you type. Change the options and see straight away what changes.

  3. Copy or download

    Copy the result with one click, save it as a file or use it as input for a next step.

Examples

Input kebab-case
Customer name customer-name
InvoiceDate invoice-date
vat_percentage vat-percentage

Words are found at spaces, underscores, hyphens and camelCase boundaries. Accents are removed and apostrophes dropped. Every line is converted separately.

CSS and HTML

Class names are case-sensitive in some places and hyphenated by convention, so .mainMenu becomes .main-menu. Custom HTML elements must contain a hyphen, as in <user-card>. Paste your list of component names and copy the hyphenated versions.

File names

Hyphens are safe in file names on every system and are read as separators by search engines. Quarterly Report 2026 becomes quarterly-report-2026. Making a URL from a headline? The slug generator also lets you set a maximum length.

Other styles

Python and database names use snake case, and JavaScript variables use camelCase.

Frequently asked questions

Where is kebab-case used?

In CSS class names such as `main-menu`, HTML and custom element names, command-line flags like `--dry-run`, URLs and many file names.

Why can I not use kebab-case for variables in most languages?

The hyphen is the minus operator, so `my-value` would be read as `my` minus `value`. That is why variables use [snake_case](/en/text/snake-case-converter) or [camelCase](/en/text/camelcase-converter), and hyphens appear in CSS, HTML and URLs.

What happens to punctuation?

It is removed: `My First Blog Post!` becomes `my-first-blog-post`. For URLs with a length limit, use the [slug generator](/en/text/slug-generator).

Can it split camelCase?

Yes. `fooBar_baz` becomes `foo-bar-baz`, so a mixed list of names comes out consistently.