How to generate n-grams from text
An n-gram is a slice of n items taken from the text, moving one step at a time. N-grams are the raw material behind search suggestions, spelling correction, plagiarism checks and simple language models. Paste your text here and it is sliced either by character or by word, then sorted by how often each slice appears.
The unit changes the result completely. Character mode counts one visible character at a time, keeping emoji and combined characters together as a single unit. Word mode treats each whitespace-separated chunk as one item. If you paste Korean or another language without spaces between every unit, remember that this is a surface-level split, not a morphological analysis: no stemming or lemmatization is applied, so 'running' and 'ran' stay separate items.
The table shows rank, n-gram, count and share, and can be copied as tab-separated text in one click. The share is relative to the total number of n-grams. If n is larger than the text, you get a message instead of an empty table, and when there are more distinct n-grams than rows on screen, the summary says how many are shown. Input is processed up to 50,000 characters.
Frequently asked questions
No. Words are split on whitespace only, so punctuation stays attached and different forms of the same word are counted separately. Use a dedicated tokenizer first if you need lemmatized results.
Character mode counts what you see, so an emoji is one character even when it is stored as several code units. If the browser does not support grapheme segmentation, counting falls back to code points and the summary says so.