Free Online Utility • Unicode Studio • Grapheme-Aware Engine

Right-align Unicode

Right-align multi-line Unicode text cleanly to a fixed column width or the longest line width using grapheme-aware measurement.

Reference & Unicode Spec Unicode 16.0
Measures visual grapheme count (not UTF-16 .length!) before inserting padding
Supports single-space, dot-leader (·), box-line (─), or emoji fill
Grapheme Width🚀 counts as 1, not 2
Fill CharAny Unicode glyph
Multi-LineFormats every row
RIGHT-ALIGN UNICODE
Formatted Unicode Output

        
100% client-side Unicode Engine Instant

Session Calculation Log

No entries recorded in this session yet.

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

InputOutputTechnical Note
🚀 (width 6, pad ·)·····🚀Exact grapheme padding
Café (width 8)4 pad chars addedAccents counted accurately
Match Longest LineAuto-detects max widthZero 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.

Frequently Asked Questions

Why does native JavaScript padStart/padEnd misalign emoji lines?
Because `padStart` counts UTF-16 code units (making `🚀` count as 2 and `👨‍👩‍👧‍👦` count as 11), whereas this tool counts grapheme clusters.
Can I align lines automatically to the longest line?
Yes — switch Auto-Max Width to Match Longest Line.
Can I use a custom Unicode character like · or ─ as the pad?
Yes — enter any single Unicode glyph in Pad Character.