Overview
Introduction
Partially masking a word while keeping its first and last letter visible is a familiar pattern from redacted documents and word-guessing games, and doing it consistently by hand across many words is tedious.
It runs entirely client-side, so nothing you paste is ever uploaded to a server.
What Is Word Letter Eraser?
A word letter eraser that masks the interior letters of every word of 3 or more letters with a chosen symbol, leaving the first and last letter visible, for example 'hello' becomes 'h***o'.
It runs entirely client-side as part of this site's String Tools collection, so nothing you paste is ever uploaded to a server.
How Word Letter Eraser Works
Every run of letters is matched as a word; words under 3 letters are returned unchanged, and longer words have their first and last letter kept while the interior is replaced with the mask symbol repeated to match its length.
The transformation happens synchronously in JavaScript the moment you type, with no network round trip involved.
When To Use Word Letter Eraser
Use it to build a word-guessing prompt, create a partial redaction where the word's shape stays recognizable, or preview how a masked layout would look.
It's a fast way to get the answer without opening a code editor, a REPL, or writing a one-off script just to check.
Often used alongside Word Eraser and Letter Remover.
Features
Advantages
- Keeps the word's length and outline visible, unlike full redaction.
- Configurable mask symbol beyond the default asterisk.
Limitations
- Words shorter than 3 letters can't be partially masked and are left as-is.
Examples
Best Practices & Notes
Best Practices
- Use a single-character mask symbol so the masked word's length stays visually accurate.
Developer Notes
The regex `/[A-Za-z]+/g` finds each word; for matches of length >= 3, the replacement is `first + symbol.repeat(word.length - 2) + last`, so the output string always has the same length as the input.
Word Letter Eraser Use Cases
- Creating a word-guessing or hangman-style prompt
- Building a partial redaction that keeps word shape recognizable
- Previewing masked text layouts before publishing
Common Mistakes
- Expecting short words (1-2 letters) to be masked; they're intentionally left untouched.
- Using a multi-character mask symbol and being surprised the masked word gets longer than the original.
Tips
- Pair with the Word Eraser tool when you want some words fully hidden and others only partially masked.