SlugGenerator.app

Kebab Case Converter

Convert any text to kebab-case format for URL slugs, CSS class names, REST endpoints, and file naming conventions.

Try:

What Is Kebab Case?

Kebab case (also called kebab-case, dash-case, or lisp-case) is a naming convention where words are separated by hyphens and all letters are lowercase. For example,my-variable-name or user-profile-page.

Kebab Case vs Other Naming Conventions

  • Kebab case: my-variable-name — used in URLs, CSS, HTML attributes
  • Camel case: myVariableName — used in JavaScript, Java
  • Snake case: my_variable_name — used in Python, Ruby, databases
  • Pascal case: MyVariableName — used in C#, React components

How to Convert camelCase to kebab-case

Converting camelCase to kebab-case is common when turning JavaScript variable names into CSS classes or URL-friendly strings. The algorithm inserts a hyphen before each uppercase letter and lowercases everything:

  • myComponentNamemy-component-name
  • userProfilePageuser-profile-page
  • backgroundColorbackground-color

This is especially useful in React projects where component names (PascalCase) need to become CSS class names (kebab-case), or when generating URL slugs from code identifiers.

kebab-case vs snake_case

ConventionSeparatorExampleBest For
kebab-casehyphen (-)my-variableURLs, CSS, HTML
snake_caseunderscore (_)my_variablePython, databases, APIs

kebab-case Slug for SEO URLs

A kebab-case slug is the standard shape for many SEO-friendly URLs because hyphens are easy for people and search engines to read. For example, Product Launch Checklist becomesproduct-launch-checklist. If you are creating page URLs, you can also use the URL Slug Generatorfor stop-word removal, max length, and bulk mode.

kebab case in JavaScript, CSS, and REST URLs

JavaScript code usually uses camelCase, but kebab case appears often in CSS class names, custom elements, file names, REST endpoint paths, and route slugs. This converter is useful when a JS variable such as userProfilePageneeds to become user-profile-page for a URL or CSS selector.

Where to Use Kebab Case

  • CSS class names and IDs
  • URL slugs and file names
  • REST endpoint paths such as /user-profiles
  • HTML data attributes
  • npm package names
  • Git branch names
  • Docker container names
  • Kubernetes resource names
  • Angular component selectors

Related Slug Tools

Need a full SEO slug workflow? Try the URL Slug Generator. Need permanent blog URLs? Use the Permalink Generator.

Related Tools

/

Slug Generator

Convert text to URL slugs

🔗

URL Slug Generator

Create SEO-friendly URL slugs

📝

Text to Slug

Transform any text into a slug

Slugify Online

Slugify text instantly online

🔒

Permalink Generator

Create clean permanent URLs

🌐

WordPress Slug Generator

Generate slugs for WordPress

✍️

Blog Slug Generator

Generate slugs for blog posts

🏷️

Product Slug Generator

Generate slugs for product pages

Aa

Case Converter

Convert text to any case format

aA

CamelCase Converter

Convert text to camelCase

Tt

Title Case Converter

Capitalize text in title case

Ss

Sentence Case Converter

Convert text to sentence case

s_c

Snake Case Converter

Convert text to snake_case

Pc

PascalCase Converter

Convert text to PascalCase

aLt

Alternating Case

Convert text to aLtErNaTiNg CaSe

d.c

Dot Case Converter

Convert text to dot.case

C_C

Constant Case Converter

Convert text to CONSTANT_CASE

🔢

Word Counter

Count words, characters & sentences

📄

Lorem Ipsum Generator

Generate placeholder text

📋

Plain Text Converter

Strip formatting, clean text

✂️

Duplicate Line Remover

Remove duplicate lines from text

Remove Empty Lines

Remove blank lines from text

↕️

Sort Lines Alphabetically

Sort text lines A-Z or Z-A

↩️

Remove Line Breaks

Join lines into one paragraph

Em Dash Remover

Replace em dashes with commas or hyphens

👁

Invisible Character Detector

Find hidden Unicode characters with code points

%20

URL Encoder / Decoder

Encode & decode URLs online

📊

UTM Builder

Build campaign tracking URLs

{}

JSON Keys to camelCase

Convert JSON keys to camelCase

{_}

JSON Keys to snake_case

Convert JSON keys to snake_case