kebab-case Converter

Paste any text and instantly convert it to kebab-case format for use in URLs, CSS class names, and HTML attributes.

Input Text

Conversion Examples

Hello World hello-world
camelCaseString camel-case-string
PascalCaseExample pascal-case-example
snake_case_name snake-case-name
Mixed spaces--here mixed-spaces-here
Version2Release version-2-release

kebab-case Output

Enter text on the left to see the result

Copied!

Summary

Paste any text and instantly convert it to kebab-case format for use in URLs, CSS class names, and HTML attributes.

How it works

  1. Paste or type your text into the input box.
  2. The converter detects word boundaries from spaces, underscores, camelCase transitions, and punctuation.
  3. All letters are lowercased and words are joined with hyphens.
  4. Invalid characters (non-alphanumeric, non-hyphen) are removed.
  5. The kebab-case result appears instantly — click Copy to grab it.

Use cases

  • Generate CSS class names from human-readable labels.
  • Create URL-safe slugs from article titles or product names.
  • Convert camelCase or PascalCase variable names for HTML data attributes.
  • Normalize filenames to a consistent kebab-case convention.
  • Transform snake_case database column names into kebab-case identifiers.
  • Convert headings into anchor IDs for markdown or HTML documents.
  • Produce consistent route segments when scaffolding a new project.
  • Sanitize user-supplied strings before using them in DOM attributes.

Frequently Asked Questions

Last updated: 2026-06-09 · Reviewed by Nham Vu