Text slugify
text-slugify · version 1.0.0 · Text · free, no key needed
Create a deterministic ASCII or Unicode slug using an explicit, documented normalization profile.
Use when you need to: slugify text · make an ASCII slug · make a Unicode slug.
Decide before calling
Read the versioned contract and the supported scope below. Reuse text-slugify@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use text-slugify@1.0.0 for slugify text. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- slugify text
- make an ASCII slug
- make a Unicode slug
- convert title to URL name
- normalize words to a slug
- create underscore slug
Not supported
- GitHub heading duplicate anchors
- language-specific transliteration
- checking an existing URL-safe name
Behavior
- The caller selects profile "ascii" or "unicode"; this tool does not claim one slug convention is universal.
- ascii uses runtime Unicode NFKD, removes combining marks, drops remaining non-ASCII characters, lowercases, and retains ASCII a-z and 0-9.
- unicode uses runtime Unicode NFKC, lowercases, removes zero-width joiners (U+200C, U+200D), variation selectors (U+FE00 to U+FE0F) and the keycap mark (U+20E3) without splitting the word, and retains Unicode letters and numbers plus any combining marks that follow them, so Hindi vowel signs and Hebrew points stay in the word.
- A combining mark with no letter or number before it is dropped as a separator. Lowercasing is the runtime default, not locale-specific, so Turkish capital I with dot gives i plus a combining dot in unicode and i in ascii.
- Runs of all other characters become one selected separator; leading and trailing separators are removed. The separator defaults to hyphen. Text with no retained characters gives an empty slug.
- Normalization can lengthen text. A slug longer than 4096 UTF-16 code units is rejected with limit_exceeded rather than returned.
Input
text(string, required): min length 1; max length 4096profile(one of "ascii", "unicode", required)separator(one of "-", "_", optional): default"-"
Output
slug(string, required): max length 4096
Limits
- max text bytes: 4096
- max slug chars: 4096
Example
Request input:
{
"text": "Crème brûlée",
"profile": "ascii"
}
Response:
{
"result": {
"slug": "creme-brulee"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "text-slugify",
"version": "1.0.0",
"input": {
"text": "Crème brûlée",
"profile": "ascii"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/text-slugify/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"text":"Crème brûlée","profile":"ascii"}'
The machine-readable contract is at /v1/tools/text-slugify/versions/1.0.0.
CLI
node cli.mjs run text-slugify 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Citation record normalize: Normalize one CSL 1.0.2 citation record: NFC, whitespace, empty values, DOI wrapper, page dashes, dates; lists changes.
- Text line endings normalize: Normalize all line endings in a text to a specific format (LF, CRLF, or CR).
- Text apply unified patch: Apply a one-file unified patch to text at original line addresses with exact hunk matches.
- Text paragraphs split: Split text into paragraphs separated by blank lines (CommonMark line rules) with code point spans and line numbers.
- Text sentences split: Split text into sentences using the default Unicode UAX #29 sentence boundary rules (Unicode 17.0.0).
- Text tabs to spaces: Convert tab characters to spaces.