转换为短横线命名

按照 短横线命名 格式编码输入数据。

输入: 文本结果: 文本

文本输入

工具选项

案例

Make a CSS custom-property name from a design token

The result can be prefixed with -- when used as a CSS custom property.

输入

PrimaryAccentColor

Expected answer

primary-accent-color
尝试感知上下文
Off
Turn an acronym-bearing document title into a slug

Acronyms become lowercase words separated by hyphens.

输入

JSON API Reference

Expected answer

json-api-reference
尝试感知上下文
Off
Normalize repeated separators in a release label

Repeated spaces, underscores and hyphens become single boundaries.

输入

  Release__Notes---2026  

Expected answer

release-notes-2026
尝试感知上下文
Off
Convert an accented article title into an ASCII slug

Accent removal is useful for this slug; it does not preserve the original spelling.

输入

Crème brûlée recipe

Expected answer

creme-brulee-recipe
尝试感知上下文
Off
Transform separate tokens while retaining a quoted label

The output is a text transformation, not automatically valid source code.

输入

backgroundColor: "Keep_This"; fontSize: 16;

Expected answer

background-color: "Keep_This"; font-size: 16;
尝试感知上下文
On
To Kebab case (dumb)

输入

hello world

Expected answer

hello-world
尝试感知上下文
Off
To Kebab case (smart)

输入

test='hello'
echo $test
aKebabCaseFunction
$aKebabCaseVariable;
function functionName() {
  console.log('things inside quotes do not get broken');
  console.log("things inside quotes do not get broken");
}

Expected answer

test='hello'
echo $test
a-kebab-case-function
$a-kebab-case-variable;
function function-name() {
  console.log('things inside quotes do not get broken');
  console.log("things inside quotes do not get broken");
}
尝试感知上下文
On

参数

参数默认值输入与选项
尝试感知上下文false开启或关闭

相关工具

代码整理

操作参考

查看原始技术文档 (English)