Random UTF-8 Character Generator
Generate cryptographically secure random valid UTF-8 strings. Filter by Unicode blocks including Basic Latin, CJK, Emojis, and Mathematical Operators.
Result
About
Generating purely random bytes often results in invalid UTF-8 sequences, leading to replacement characters () or decoding errors. This tool bypasses byte-level manipulation by mathematically generating valid Unicode code points and relying on the browser's native engine to encode them correctly into UTF-8.
By defining explicit boundaries, we exclude surrogate halves (U+D800 to U+DFFF) and non-characters, ensuring that every generated string is strictly valid for database insertion, UI testing, or cryptographic seeding. The selection algorithm guarantees a uniform probability distribution across all active blocks by calculating the aggregate scalar size of the selected domains.
Formulas
To achieve a mathematically uniform distribution when selecting a random character from multiple non-contiguous ranges, the probability P of selecting any specific character c must be equal across the entire active pool. The probability is defined as:
Where n is the number of selected Unicode blocks, and |Ri| represents the cardinality (number of valid code points) of the i-th block. We generate a random scalar r such that 0 β€ r < β|Ri|. We then map r to a specific code point by sequentially subtracting block sizes until the target sub-domain is isolated.
Reference Data
| Unicode Block | Hexadecimal Range | Code Point Count | Examples |
|---|---|---|---|
| Basic Latin (Printable) | 0x0020 - 0x007E | 95 | A, b, 1, @ |
| Latin-1 Supplement | 0x00A0 - 0x00FF | 96 | Γ©, Γ±, Γ, Β© |
| Cyrillic | 0x0400 - 0x04FF | 256 | А, б, Д, з |
| Greek and Coptic | 0x0370 - 0x03FF | 144 | Ξ±, Ξ², Ξ©, β |
| Mathematical Operators | 0x2200 - 0x22FF | 256 | β«, β, β, β |
| Braille Patterns | 0x2800 - 0x28FF | 256 | β , β , β , β |
| Miscellaneous Symbols | 0x2600 - 0x26FF | 256 | β, β, β, β |
| Emoticons (Emojis) | 0x1F600 - 0x1F64F | 80 | π, π, π |
| CJK Unified Ideographs | 0x4E00 - 0x9FFF | 20,992 | δΈ, ζ, ε |