Center Unicode Text Tool Online

Center Unicode text within a fixed width, with real grapheme counting for emoji and CJK width for monospace. Free, offline, client-side.

Centre multi-line text inside a fixed width using any padding character you like. Supports three counting modes: simple code-points, grapheme clusters (emoji-correct), and monospace display width (East-Asian wide characters count as 2 columns).

How to Use Center Unicode Text Tool Online

  1. Paste your text. Multi-line is fully supported - each line is centred independently against the target width.
  2. Choose a target width. Any integer between 1 and 500. Lines that already exceed this width are passed through unchanged rather than truncated.
  3. Pick a pad character. Usually a space but the field accepts up to 8 characters. A sequence like -=- repeats cyclically on each side.
  4. Pick a counting mode. Grapheme clusters (default) uses Intl.Segmenter so emojis like πŸ³οΈβ€πŸŒˆ count as 1. Code points is the naive [...str] split - fast but wrong for ZWJ emoji. Monospace counts CJK and emoji as 2 columns - useful for terminal output.
  5. Click Center or press Ctrl/Cmd+Enter. The input is also debounced at 200ms so typing produces a live preview.
  6. Read the stats line. Line count, longest input line in the chosen mode, total padding units added, and compute time.
  7. Copy or download. Copy places the centred text on your clipboard; Download saves a timestamped .txt.

Frequently Asked Questions

What is Unicode text centering?

Aligning text to the centre of a fixed-width column by adding equal padding on both sides. When the total pad is odd the extra column goes on the right.

How does grapheme-cluster counting work?

The tool uses Intl.Segmenter with granularity: 'grapheme' to split input into what users actually perceive as single characters. A ZWJ-joined emoji like πŸ‘¨β€πŸ¦° (man with red hair, 4 code points) counts as exactly 1 grapheme – so it centres correctly.

When should I pick code-point mode?

When you want the fastest path and you know your input does not contain ZWJ emoji, flags, or combining marks. It uses [...str] which is O(n) and has zero API dependency.

When should I pick monospace mode?

Whenever the output will be displayed in a terminal, code editor, or monospace font. CJK characters (δ½ , ε₯½) and most emoji take 2 display columns in monospace, so centring them correctly requires counting those as 2. This mode approximates East-Asian-Width rules without shipping the full table.

What happens if my text is longer than the specified width?

The line passes through untouched. The tool never truncates – it only adds padding when there is room to fit.

Can I center multi-line text?

Yes. Each line is centred independently, so paragraphs, lists, and tables can all be padded to the same width for visual alignment.

What padding characters can I use?

Any character, including Unicode symbols, dashes, dots, or even multi-character sequences. The pad field accepts up to 8 characters which repeat cyclically on each side – -= becomes -=-=- etc.

What if my browser lacks Intl.Segmenter?

The tool detects that at runtime and surfaces a yellow warning. Grapheme mode silently falls back to code-point splitting, so some emoji sequences may end up one column too wide or narrow until you upgrade the browser.

Is my text data secure and is this tool free?

Yes on both counts. All centering happens in your browser – no upload, no server call – and the tool is free with no sign-up, ads, or usage caps.

What are common use cases?

ASCII banners, centred headings in plain-text READMEs, aligning labels in CLI tables, decorative borders for terminal dashboards, and creating centred titles in Markdown code fences.