How to Use the Center / Right-Align Text Tool
- Set the column Width (default 80, the classic terminal column width) and choose a Pad character — usually a space, but a dot or dash works for banners.
- Paste your lines into the input.
- Click Center to split padding evenly on both sides, or Right-Align to push every line to the right edge.
- The output is monospace-formatted; copy it into a terminal, README, ASCII banner, or fixed-width report.
This tool fills the gap CSS can't fill: aligning text in environments where every character is the same width. Terminal banners, code comments, ASCII art frames, fixed-width log columns, and README badges all rely on counting characters rather than measuring pixels — and that is exactly what this tool does.
How the Center / Right-Align Tool Works
For each line the tool measures its character length, computes the padding needed to reach the target width, and inserts the chosen pad character. Centring distributes the padding as floor(extra/2) on the left and ceiling(extra/2) on the right — the standard ASCII-art convention. Lines already at or beyond the target width are left untouched so nothing is truncated.
- Per-line padding using a single configurable character
- Centre or right-align modes — left alignment is the input's default state
- Lines longer than the width are returned verbatim, never cropped
- Works for ASCII banners, README headings, terminal printouts, and code-comment boxes
Frequently Asked Questions
What happens if a line is already longer than the target width?
The line is left exactly as it is — never truncated and never wrapped. Only shorter lines get padded out to the target width.
Can I use a character other than space for padding?
Yes. Set the pad character to anything you like: a dot for dot leaders, an underscore for fill-in-the-blank lines, a dash for separator banners, or any single Unicode glyph.
Will the output look right in a proportional font?
No — alignment is character-based, so it only looks correct in a monospace font (terminals, code editors, fixed-width email). In Times or Arial the columns will drift.
Why does centring with an odd remainder put the extra space on the right?
When the leftover padding is odd, one side gets the extra character. The tool puts that extra on the right (floor on the left, ceiling on the right) — the standard convention for ASCII centring.
See also Text Pad, Whitespace Converter, and the Word Wrap tool for related fixed-width formatting.