How Right-align Unicode Works
Right-align Unicode aligns and pads multi-line Unicode text to a chosen column width (or automatically to the longest line) by counting true UAX #29 grapheme clusters rather than broken UTF-16 code units.
The Unicode Standard assigns unique scalar code points from U+0000 through U+10FFFF across 17 planes, encompassing over 150,000 characters spanning world scripts, mathematical operators, technical symbols, combining diacritics, and multi-codepoint emoji sequences. Every operation in this utility runs completely client-side inside your browser using native code-point and grapheme-cluster algorithms so surrogate pairs, ZWJ emoji, and combining marks stay intact with zero server latency.
Grapheme-Aware Padding Math
gap = max(0, targetWidth - splitGraphemes(line).length) Left/Right-Align: pad * gap + line Right-Pad: line + pad * gap Center: pad * floor(gap/2) + line + pad * ceil(gap/2)
JavaScript native `.padStart()` and `.padEnd()` miscount emojis (`"🚀".length === 2`), causing misaligned columns whenever rows mix ASCII and emojis; grapheme measurement aligns every row cleanly.
Worked Reference Examples
| Input | Output | Technical Note |
|---|---|---|
| 🚀 (width 6, pad ·) | ·····🚀 | Exact grapheme padding |
| Café (width 8) | 4 pad chars added | Accents counted accurately |
| Match Longest Line | Auto-detects max width | Zero manual math |
Practical Developer & Internationalization Workflows
Plain-Text Tables, Receipts & Banners
Align menus, invoices, and CLI banners cleanly using spaces, dot-leaders (`·`), or lines (`─`).
Multilingual Typography
Format headlines containing accented letters and symbols without jagged edges.
Compatibility, Edge Cases & Best Practices
Type a space in Pad Character for clean blank alignment, or any Unicode glyph like `·`, `─`, or `0` for decorative/numeric padding.
Copy verified outputs directly to your clipboard or export them as UTF-8 text files ready for web apps, REST APIs, database migrations, typography tests, and localization pipelines.