Fun Translations
Login
Fun Translations
Toggle sidebar
Kebab Case Translator

Kebab Case Translator

Translate to kebab case. This translator changes the text to lowercase and also replaces spaces by hyphens. The resulting style of text is often used as slugs in url like this "this-is-a-url-text".

Enter your text

Enter some text and click Translate to see the result

What Is kebab-case?

kebab-case (also called lisp-case or spinal-case) is a naming convention in which words are written in lower case and separated by hyphens: my-variable-name, hello-world, the-quick-brown-fox, background-color. The name is a visual metaphor — words speared on hyphens like chunks of meat on a kebab skewer. It is one of the major programming naming conventions alongside camelCase, snake_case, and PascalCase, each dominant in different domains.

kebab-case is the dominant convention in CSS (Cascading Style Sheets), where property names like background-color, font-size, border-radius, and margin-top all use hyphens as separators. It is also used in HTML attributes, in URL design (hyphenated URLs like /my-page-title are preferred for SEO and readability), and in many CLI tool flag names. If you write CSS, you write kebab-case.

kebab-case in Web Development

CSS is the primary domain where kebab-case is not just common but essentially mandatory. The CSS specification defines all property names using hyphens: color, background-color, border-bottom-width, font-family. This convention extends to custom properties (CSS variables): --primary-color, --font-size-large, --spacing-unit. The hyphen is the structural separator of the CSS world.

URLs and web paths are another major kebab-case domain. Google and other search engines prefer hyphen-separated URL slugs (/my-blog-post) over underscore-separated ones (/my_blog_post) or camelCase ones (/myBlogPost), because hyphens are treated as word separators in search indexing while underscores are not. This SEO consideration has made kebab-case URL slugs the de facto standard for web content management systems and blogs worldwide.

kebab-case Across Domains

Where kebab-case is the standard or preferred convention:

Domain Example Why
CSS propertiesbackground-colorCSS specification standard
CSS custom properties--primary-fontFollows CSS conventions
HTML data attributesdata-user-idHTML attribute naming
URL slugs/my-blog-postSEO preference, readability
CLI flags--dry-runCommon CLI convention
npm packagesmy-package-namenpm naming convention
Lisp/Clojuremy-function-nameLanguage tradition

The Hyphen's Unique Problem

kebab-case has one significant limitation compared to snake_case and camelCase: the hyphen character (-) is the subtraction operator in most programming languages. This means that while kebab-case works perfectly in CSS and URL contexts where hyphens have no arithmetic meaning, it cannot be used for variable and function names in most general-purpose programming languages — my-variable would be parsed as my minus variable.

Lisp family languages (Common Lisp, Clojure, Scheme) are the major exceptions: they use hyphens as word separators in function and variable names because the language syntax treats the hyphen differently. This is sometimes called "lisp-case" in reference to this tradition. For all other major languages, kebab-case is domain-specific: CSS, URLs, CLIs, and configuration formats rather than general-purpose code identifiers.

How This kebab-case Converter Works

This kebab-case converter transforms your text into kebab-case format — converting all letters to lower case and replacing spaces with hyphens to produce the hyphen-connected identifiers used in CSS, URLs, HTML, and CLI tools.

Perfect for web developers, CSS writers, URL designers, CLI tool builders, or anyone who needs to convert natural language text into clean, hyphenated kebab-case identifiers. this-is-your-kebab-case-converter-ready-to-skewer-your-words.

Try Other Translators

Related & Interesting