kebab-case Converter Online

Convert sentences, variable names, and titles into clean, lowercase hyphen-delimited kebab-case strings.

kebab-case Converter splits text into word tokens, lowercases every character, and joins words with ASCII hyphens (U+002D). For example, How to Build a Custom Text Editor (7 words, 33 chars) becomes how-to-build-a-custom-text-editor (1 slug, 33 chars).

Fixed:
0 Characters
0 Words
0 Sentences
🧹 Remove
🔤 Convert
📑 Format
Copied to clipboard

What Is kebab-case (Dash-Case)?

kebab-case is a lowercase identifier and slug format where words are separated by single ASCII hyphens (-, U+002D) with all spaces and punctuation removed.

kebab-case (also known as dash-case, hyphen-case, or lisp-case) is a naming convention where all letters are converted to lowercase and separated by hyphens (for example, how-to-build-a-custom-text-editor).

What Regex & Tokenization Rule Does kebab-case Use?

The tokenizer extracts words across spaces, underscores, and camelCase transitions (/(?<=\p{Ll})(?=\p{Lu})/u), then executes words.map(w => w.toLowerCase()).join("-").

  • Word Extraction Rule: Alphanumeric sequences [\p{L}\p{N}]+ are isolated and lowercased; non-alphanumeric symbols are stripped.
  • Worked Before / After Example: Input How to Build a Custom Text Editor (7 words, 33 characters) → Output how-to-build-a-custom-text-editor (1 slug, 33 characters, 5 uppercase letters lowercased, 6 spaces replaced by -).
Input Format / Transformation Rule Input Example (Before) Output Result (After) Characters Changed (count)
Article Headline → URL Slug How to Build a Text Editor (26 chars, 6 words) how-to-build-a-text-editor (26 chars, 1 slug) 4 letters lowercased, 5 spaces → -
PascalCase Component → CSS Class FeaturedProductCard (19 chars) featured-product-card (21 chars) +2 hyphens inserted, 3 letters lowercased
snake_case → kebab-case user_account_settings (21 chars) user-account-settings (21 chars) 2 underscores → 2 hyphens
CONSTANT_CASE → CLI Flag MAX_OUTPUT_TOKENS (17 chars) max-output-tokens (17 chars) 15 letters lowercased, 2 underscores → -

What Are the Best Uses for kebab-case?

kebab-case is the standard convention for SEO-friendly URL slugs, CSS class names, HTML data-* attributes, npm package names, and CLI flags.

  • URL Slugs & SEO: Web addresses require hyphenated, lowercase keywords for optimal search indexing and browser readability.
  • CSS & HTML: Standard styling conventions (BEM, utility classes) and custom HTML data attributes (data-user-id) use kebab-case.
  • CLI Flags & Configuration: Command line flags (--output-format) and package names on npm.

Is kebab-case Conversion 100% Client-Side?

Yes—every conversion runs offline in your browser with zero server calls.

Convert thousands of lines instantly without data ever leaving your browser. Works completely offline.

How to use this tool:

  1. Paste or type your text into the editor box above.
  2. Click the highlighted action button to run the transformation instantly on your device.
  3. Click Copy to place the cleaned text onto your clipboard.

More Free Online Text Tools

Cleaning & Stripping
Clean Pasted Text Remove Em Dash Remove Line Breaks Remove Invisible Chars Straighten Quotes Strip HTML Strip Markdown
Case Converters
All 11 Case Converters Sentence Case camelCase Converter snake_case Converter
Formatting & Analytics
Remove Duplicate Lines Alphabetize List Word & Character Counter

Clean text from any app with the Share Sheet.

Select text in Safari, Mail, or Notes and share it to Clean Text. The cleaned version is copied back to your clipboard with a summary of what was fixed.

  • Works inside Safari, Mail, Notes, Word, and Slack
  • Counts and audits damage: '2 em dashes, 3 invisible characters removed'
  • 100% on-device: zero network requests, zero telemetry, full privacy
  • Available on iPhone, iPad, and Mac
Text Cleaner: Case Converter App Screenshot