---
title: Slug Generator — URL-Safe Slugs from Any Text
url: https://varstatt.com/toolkit/slug
description: Generate clean, URL-safe slugs from any text. Customize separators, transliterate accents, set max length. Live preview.
section: Developer Toolkit (https://varstatt.com/toolkit)
tags: text
related: Case (https://varstatt.com/toolkit/case), Slug (https://varstatt.com/toolkit/slug), Regex (https://varstatt.com/toolkit/regex)
---
# Slug Generator

Generate clean, URL-safe slugs from any text. Customize separators, transliterate accents, set max length. Live preview.

## How It Works

1. **Enter your text** — Type or paste a title, heading, or any string you want to turn into a URL-safe slug.
2. **Customize options** — Choose a separator (hyphen, underscore, or dot), toggle lowercase, enable accent transliteration, and set a max length.
3. **Copy the slug** — The slug updates live as you type. Click copy to grab it for your CMS, router, or file name.

## FAQ

### What characters are removed?

Everything except letters, numbers, and the chosen separator is stripped. Multiple separators are collapsed into one, and leading/trailing separators are trimmed.

### Does it handle accented characters?

Yes. With transliteration enabled, accented Latin characters are converted to their ASCII equivalents — e.g. ü becomes u, ñ becomes n, œ becomes oe.

### What happens if my slug exceeds the max length?

The slug is truncated at the nearest word boundary before the limit, so you won't get a slug that ends mid-word or with a trailing separator.

### Can I use this for file names?

Yes. Use the dot or underscore separator for file names. The output is safe for file systems, URLs, and database keys. For converting between naming conventions in code, also see the [case converter](https://varstatt.com/toolkit/case-converter).

## Usage

This tool runs entirely in the browser — visit the URL above to use it.

Prefill inputs via URL parameters:

- `https://varstatt.com/toolkit/slug?source=...`

## Related Tools

- [Case](https://varstatt.com/toolkit/case)
- [Slug](https://varstatt.com/toolkit/slug)
- [Regex](https://varstatt.com/toolkit/regex)
