Find the shortest word

Paste any text and get the shortest word in it, with its character length. Ties go to the first word encountered. The tokenizer is \b[\w']+\b. The transform runs in your browser; nothing uploads. For the inverse, see find longest word.

Input
Line 1:1 LF cloud_done Saved locally
Result Shortest Word
0 lines 0 chars

Shortest word, by character count

The shortest word is the match of \b[\w']+\b with the smallest length. The output is one line: Shortest word: "WORD" (N characters). If the input has no words, the output is No words found. Common short answers in English are 1- and 2-letter words like a, I, is, of, to.

Ties are broken by first-encountered. The reduction iterates left-to-right and only replaces the running shortest when a strictly shorter word is seen. So in "of to" the answer is of, not to, because they tie at length 2 and of came first.

Hyphens break words. Apostrophes are inside words. Numbers count as words. For the matching longest tool, see find longest word; for the average across the whole input, see average word length.

How to use find the shortest word

  1. 1Paste or type your text into the input panel on the left.
  2. 2The shortest word and its length appear in the output panel as you type.
  3. 3Click Copy in the output header to copy the result.
  4. 4Click Download to save it as a plain-text file.
  5. 5Run find longest word alongside for the opposite end.

Keyboard shortcuts

Drive TextResult without touching the mouse.

Shortcut Action
Ctrl FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun a saved workflow Plus

What this tool actually does

Tokenizes on \b[\w']+\b

A word is a run of \w with optional internal apostrophes. Hyphens break words. Numbers count.

Length in JavaScript code units

The character count is String.length. For Latin text this matches the hand-count of letters; surrogate-pair characters (rare in word matches) would count as two.

Ties go to the first-encountered word

A reduce-from-left tracks the running shortest. It is only replaced when a strictly shorter word is seen, so the leftmost word in a length tie wins.

No-words case

If there are no matches (empty input, punctuation-only), the output is No words found. with no quoted word.

Runs entirely in your browser

No upload, no logging. The result updates on every keystroke.

Worked example

Every word in this sentence is at least 3 characters; The wins by being first. Add the word a anywhere and the result becomes Shortest word: "a" (1 characters).

Input
The quick brown fox jumps over the lazy dog.
Output
Shortest word: "The" (3 characters)

Settings reference

Behaviour Value
Word definition \b[\w']+\b.
Length unit JavaScript String.length.
Tie-break First-encountered wins.
Output format Shortest word: "WORD" (N characters).
No-words input No words found.
Hyphenated terms Split into separate words on the hyphen.

FAQ

What if several words tie for shortest?
The first one in the input wins. The reduction only replaces the current shortest when a strictly shorter word is seen.
Does "a" always win?
Whenever it is in the input, yes, because no shorter English word exists. I would also tie at length 1; the first occurrence wins.
What about hyphenated words?
They split on the hyphen, so state-of-the-art contributes state, of, the, art. The shortest is of or the (tie, leftmost wins).
What does the tool report on empty input?
No words found. The same message appears for punctuation-only or whitespace-only inputs.
Is the input sent anywhere?
No. The scan runs in your browser. Nothing uploads, nothing is logged.