Skip to content

Kebab Case Converter

Turn titles, variable names and phrases into hyphen-separated identifiers for CSS classes, URLs, file names and config keys.

Processed locally in your browser

Options
0 chars · 0 lines
The result will appear here.

What is Kebab Case Converter?

Kebab case writes words in lowercase joined by hyphens: my-css-class. It is the usual style for CSS classes, HTML attributes, URL paths, npm package names, file names and CLI flags, and it is called dash-case or lisp-case in other communities. The same word pattern also exists as Train-Case (My-Css-Class) and COBOL-CASE (MY-CSS-CLASS), used in HTTP header names and legacy code.

The converter finds the words in any input, whether it is a sentence, a camelCase or PascalCase name, snake_case, dotted or slashed text, splits before capitals and around numbers, and joins them with hyphens. The URL slug style behaves differently on purpose: it keeps camelCase words together, drops apostrophes and symbols, and transliterates Latin accents, so "Café Crème Brûlée!" becomes cafe-creme-brulee.

How does it work?

  1. Paste your names, titles or phrases, one per line.
  2. Pick kebab-case, Train-Case, COBOL-CASE or URL slug in the Style list.
  3. Tick accent stripping for ASCII-only output, set a maximum length if you need short names, and decide whether numbers are split from letters.
  4. Copy the result; every line is converted independently unless you turn off the per-line option.

Common use cases

  • Naming CSS classes, BEM blocks or custom HTML attributes from a design token or a label.
  • Building consistent file names, folder names or npm package names from article titles.
  • Converting camelCase JSON keys or environment-style names into hyphenated config keys.
  • Producing Train-Case HTTP header names such as Content-Type or X-Request-Id.

Examples

Try this input in the tool above:

Input
userFirstName
HTTPResponseCode
My Blog Post: Café & Crème Brûlée!
get_user_by_id
version2Beta
Output
user-first-name
http-response-code
my-blog-post-café-crème-brûlée
get-user-by-id
version-2-beta

Privacy

Kebab Case Converter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

Kebab-case drops characters that are not letters or digits, including underscores and punctuation. Non-Latin letters such as Arabic or Cyrillic are kept, but they are not transliterated to ASCII.

Frequently asked questions

What is the difference between kebab-case and snake_case?

Both are lowercase word lists; kebab-case joins words with hyphens (my-name) and snake_case with underscores (my_name). Hyphens are valid in CSS and URLs but not in most programming-language variable names.

How is the URL slug style different from kebab-case?

A slug treats the text as a title: camelCase words are not split, apostrophes and symbols are dropped and Latin accents are always removed. Kebab-case splits camelCase and acronym boundaries first.

What are Train-Case and COBOL-CASE?

Train-Case capitalizes each word (Accept-Language) and COBOL-CASE writes every letter in capitals (ACCEPT-LANGUAGE). Both keep the hyphen separators of kebab-case.

More tools in Text Tools →