Text Transformer

Four quick text cleaners in one page: build URL / file-name friendly slugs, truncate long text by characters or words, pad lines to a fixed width, and deduplicate words.
All processing happens locally in your browser — your data is never uploaded to any server.
How it works: Non-letter / number runs (spaces, punctuation, HTML tags and entities) collapse to one separator; Unicode letters and numbers — including CJK — are kept.
Separator:
Max length (characters): 0 = no limit
How it works: Cut the text at a limit measured in characters or words. If the text already fits, it is left untouched.
Limit by: Max:
How it works: Every input line is padded with the pad string until it reaches the target width — handy for aligning columns in plain text.
Align: Target width: Pad string:
How it works: A word is any run of letters / numbers (CJK included) with optional inner hyphens, apostrophes or underscores.
Scope:
Ctrl+Enter in the input also runs the active mode.
Pick a mode above and click its action button (or press Ctrl+Enter). All text processing stays in your browser.
About each mode:
Slug Generator — converts any text (headings, titles, product names) into a clean URL or file-name slug. HTML tags and entities are stripped, punctuation and whitespace runs collapse to one separator, and Unicode letters/numbers are kept — the same GitHub-style rules used by the site's Markdown heading anchors. Set a max length to keep slugs short; the slug is trimmed on a separator so it never ends mid-word.
Truncate — cuts text at N characters (code points) or N words. With “Append ...” on, a trailing “...” is added only when something was actually cut, so short text is never changed.
Pad Lines — aligns every line to the same width for plain-text column layout. Width is measured in characters; a multi-character pad string (e.g. - or 0) is repeated and trimmed to fit. Center alignment splits the extra padding left/right.
Word Dedupe — “whole text” prints one unique word per line keeping the first occurrence (great for keyword lists); “adjacent repeats” removes runs of the same word inside the text, like “the the”, while keeping punctuation and line structure. “Ignore case” treats Hello and hello as the same word.