QuickFreeTools

Online Generate Text N-grams

Extract word or character n-grams from text. Choose n (e.g. 2 for bigrams, 3 for trigrams) and get overlapping sequences. Client-side only.

one two
two three
three four
four five

Frequently Asked Questions

What are n-grams?
N-grams are contiguous sequences of n items from text—either words (e.g. 'the cat' 'cat sat') or characters (e.g. 'abc' 'bcd'). Used in NLP and search.
Word vs character n-grams?
Word n-grams use space-separated tokens; character n-grams use every character (or every character in words). Choose based on your use case.
How is overlap handled?
By default we produce overlapping n-grams: each window of n items is one n-gram, so 'a b c' gives bigrams 'a b' and 'b c'.

Related Text Tools