Overview
Introduction
Character-level frequency analysis, cipher-breaking exercises, and n-gram language models all start from a list of individual characters.
This tool produces that list directly.
What Is String Unigram Generator?
A unigram generator that lists every character in the input on its own line, in original order.
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 String Unigram Generator Works
The input is spread into an array of Unicode code points and each one is printed on its own line.
The transformation happens synchronously in JavaScript the moment you type, with no network round trip involved.
When To Use String Unigram Generator
Use it as a first step toward character-frequency analysis, or to visually inspect every character in a string one at a time.
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 String Bigram Generator and Palindrome Checker.
Features
Advantages
- Operates on Unicode code points, so multi-byte characters aren't split incorrectly.
- Simple, direct output ready for further line-based processing like sorting or counting.
Limitations
- No filtering or deduplication; every character, including spaces and punctuation, appears.
Examples
Best Practices & Notes
Best Practices
- Pair with Sort Strings to group identical characters together for a quick frequency scan by eye.
Developer Notes
Splitting uses the spread operator ([...input]) rather than input.split(""), so multi-byte Unicode characters like emoji are kept as single unigrams instead of being split into broken surrogate-pair halves.
String Unigram Generator Use Cases
- Preparing input for character-frequency analysis
- Building a character-level n-gram model
- Visually inspecting every character in a string
Common Mistakes
- Expecting spaces or punctuation to be filtered out automatically.
Tips
- Combine with Sort Strings and manual scanning for a quick, informal frequency check.