kebab-case Converter

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

Use the kebab-case Converter

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

This tool converts any string — including camelCase, PascalCase, snake_case, Title Case, or plain sentences — into kebab-case (all lowercase words joined by hyphens). It handles Unicode letters, strips invalid characters, and collapses consecutive separators automatically. The result is a clean identifier safe for use in HTML attributes, CSS class names, and URL path segments.

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-05-23 · Reviewed by Nham Vu