ForHosting KIT · Data & Files

Batch slugify a list of titles with unique URL slugs

Turn a whole list of titles into unique web-address slugs at once: «Hello World» and «Hello, World!» become hello-world and hello-world-2, and «Café Guide» becomes cafe-guide. The order of your list never changes. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Titles
Hello World, Hello, World!, Café Guide, Cafe Guide, Release 2
You get
Slugs
hello-world, hello-world-2, cafe-guide, cafe-guide-2, release-2
Quantity
5

Batch Slugify converts an ordered list of page titles, article names, product labels, or other headings into URL-friendly slugs in one deterministic request. It lowercases text, removes common Latin accents, replaces punctuation and spacing with hyphens, and preserves digits. When two titles produce the same base slug, the later result receives an incrementing numeric suffix, so every returned value is unique. The original order remains unchanged, making the output easy to align with an import file, content queue, migration plan, or publishing workflow.

Create a clean slug for every title

Provide the titles in the exact order in which you want results returned. Each title is normalized into a compact URL component: uppercase letters become lowercase, common Latin diacritical marks are removed, and each run of spaces or punctuation becomes one hyphen. Leading and trailing separators disappear.

Digits remain available, which is useful for release names, numbered chapters, years, and product editions. The operation expects actual strings rather than silently converting objects, booleans, or numbers, because accidental coercion can create plausible but incorrect URLs. A title must also produce at least one ASCII letter or digit after normalization.

This makes failures visible when an input contains only punctuation, whitespace, or characters outside the supported transliteration range. Nothing is fetched, stored, reordered, or inferred from external sources; identical input always produces identical output.

Resolve collisions without losing order

Different titles can normalize to the same slug. Capitalization, accents, repeated spaces, and punctuation distinctions all disappear during slugification, so “Cafe News,” “Café News,” and “cafe-news” share the base cafe-news. The first occurrence keeps that base.

Later occurrences receive -2, -3, and further increasing suffixes as needed. Uniqueness is checked against every slug already emitted, not merely against a count of identical source strings. That detail matters when a natural title already ends in a number or when several different spellings collapse to one form.

Processing remains left to right, which gives the input order clear precedence and makes reruns reproducible. If editorial priority matters, place the preferred title first so it receives the unsuffixed slug. The capability does not inspect an existing website or database, so it cannot know which slugs are already published there.

Include relevant existing titles in the submitted sequence, or compare the returned array with your own reserved-slug index before writing routes.

Use the result safely in publishing workflows

Batch output is particularly useful at the boundary between editorial data and a content management system. Keep each returned slug beside the source row rather than sorting the slugs independently; positional correspondence is the simple contract that lets a spreadsheet import, migration script, or static-site generator attach the right route to the right record. Validate the entire request before persisting changes, because one invalid title rejects the operation instead of returning a partial result that could leave a migration half applied.

The algorithm intentionally targets conservative ASCII URL components. Save the source titles along with the resulting slugs when redirects or future title changes must be audited, and avoid regenerating established public routes unless your redirect policy is ready.

Prepare a CMS import

Generate one unique route component for every ordered title before inserting a batch of articles or landing pages.

Migrate a content archive

Normalize legacy headings consistently and identify collision suffixes while retaining row-for-row alignment with the source export.

Build static site routes

Create deterministic filenames or route segments for a collection during a repeatable build process.

What happens when two titles create the same slug?

The first keeps the base slug. Later collisions receive incrementing suffixes such as -2, -3, and -4.

Does the output preserve input order?

Yes. Each slug occupies the same array position as its source title, and the count reports the number produced.

Does it check slugs already used on my website?

No. It guarantees uniqueness only within the submitted list and does not access your website, CMS, or database.

Why was a title rejected?

Every item must be a string and must yield at least one ASCII letter or digit after accent removal and separator cleanup.

What happens to accents, capitals and punctuation in a slug?

Capitals become lowercase, common Latin accents are removed and every run of spaces or punctuation turns into a single hyphen. Hyphens at the start or end disappear, and digits stay, which helps with numbered chapters, years and product editions.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/data/slugify-batch

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/data/slugify-batch \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"titles":["Getting Started","Getting Started","API Reference"]}'
{
  "titles": [
    "Getting Started",
    "Getting Started",
    "API Reference"
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "data.slugify_batch",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_items10000
max_chars_per_title10000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Create a clean slug for every title

The response contains a slugs array in the same order as the titles array and a count, so callers can confirm that every submitted row has a corresponding result.

Use the result safely in publishing workflows

It does not perform language-specific transliteration for every writing system, choose keywords, shorten long titles, check trademarks, or guarantee uniqueness against records omitted from the request. Those are separate editorial or storage concerns. For automation, one request costs $0.002, while the same deterministic logic can be exercised in the browser interface.

What does a request cost?

The API price is $0.002 per request, regardless of whether titles collide.

Read the full KIT documentation →