InputTestHub

kebab-case Converter

Converts text to kebab-case for URLs, CSS class names and HTML attributes.

Text Nothing uploaded No sign-up Free, unlimited
Text tool
Paste something on the left to see the result.
In short kebab-case joins words with hyphens and keeps everything lowercase, so "Primary Call To Action" becomes primary-call-to-action. It is the convention for URL slugs, CSS class names, HTML attributes and custom element names, and in two of those it is not optional. A custom element name must contain a hyphen — that is how the browser tells your element from a future standard one — and CSS property names are hyphenated by the specification. For URLs it is a genuine recommendation rather than a rule: Google has said explicitly that hyphens are read as word separators in URLs and underscores are not, so my-page-title is parsed as three words and my_page_title as one. That single fact is why the SEO convention settled on hyphens and why it matters more in a URL than anywhere else. The one place kebab-case cannot go is a variable name in most programming languages, because the hyphen is the subtraction operator — which is exactly why JavaScript accesses CSS properties as camelCase instead.

How to use the kebab-case Converter

  1. Paste your text into the input box on the left.
  2. Adjust the options above the box if you need a different behaviour.
  3. The converted text appears on the right; press Copy to put it on your clipboard.

About the kebab-case Converter

The kebab-case Converter converts text to kebab-case for URLs, CSS class names and HTML attributes. It runs as plain JavaScript inside the page, which means there is no upload step, no queue and no size limit imposed by a server — the only limit is your own device.

What people use it for

  • Writing CSS class names.
  • Creating URL paths and slugs.
  • Naming HTML data attributes.

Frequently asked questions

Is the kebab-case Converter free, or is there a paid tier?
Free, unlimited, and no email address required. You can use it a hundred times a day and nothing changes.
Does anything I enter leave my computer?
No. The kebab-case Converter runs entirely in your browser using JavaScript. Your input never reaches inputtesthub.com or any third party — open your browser's Network tab while you use it and you will see no request go out.
What do I get if I try it?
Enter "Primary Call To Action" and the kebab-case Converter returns primary-call-to-action.
What problem does the kebab-case Converter solve?
The jobs it is built for: writing CSS class names. Creating URL paths and slugs. Naming HTML data attributes. It is built for exactly those cases rather than being a general-purpose tool with this bolted on.
Does the kebab-case Converter work on a phone?
Yes. The page is responsive and the utility works in Chrome, Safari, Firefox, Edge and Samsung Internet on both Android and iOS. There is no app to install and nothing to sign into.

Related text tools

All 92
01

Case Converter

Converts text between twelve cases: UPPER, lower, Title, Sentence, camelCase, PascalCase…

02

Uppercase Converter

Converts any text to UPPERCASE instantly, keeping numbers, punctuation and line breaks exactly…

03

Lowercase Converter

Converts any text to lowercase, including text that was typed with Caps Lock on by mistake.

04

Title Case Converter

Converts headings to proper Title Case using AP and Chicago rules, keeping short words like…

05

Sentence Case Converter

Rewrites text in sentence case: first letter of each sentence capitalised, the rest lowercase…

06

camelCase Converter

Turns any phrase into camelCase for JavaScript, Java and JSON keys, stripping spaces, hyphens…

07

PascalCase Converter

Converts phrases to PascalCase (UpperCamelCase) for class names, React components and type…

08

snake_case Converter

Converts text to snake_case for Python variables, database columns and file names.

09

CONSTANT_CASE Converter

Converts text to SCREAMING_SNAKE_CASE for environment variables, constants and configuration…