EN
My tools

Text Aligner (Centre, Right, Justify, Pad)

Align plain text in monospace columns: left, centre, right or fully justified to a width, or pad each line to a length with any character, such as zeros or dots.

0 = the longest line.
For centre, right and pad modes; e.g. 0, . or -
Aligned text
Width 20 columns · 4 lines

Alignment is measured in monospace columns; it lines up in code editors, terminals and code blocks, not in proportional fonts.

My tools →
Advertisement

Line up plain text the way a word processor would, but with spaces, so it stays aligned anywhere a monospace font is used: code comments, README files, terminal output, receipts and chat code blocks. Centre or right-align each line to a width, justify paragraphs so both edges are straight, or pad lines to a fixed length with any character, such as zeros in front of numbers (0042) or dots after a label. Hangul, CJK and emoji are counted as two columns.

How to use this tool

  1. Paste the lines.
  2. Choose the alignment: left, centre, right, justify, or pad on the left or right.
  3. Set the width in columns (0 uses the longest line) and the padding character.
  4. Copy the aligned text into a monospace context.

Formula

Padding = width − line width · centre: ⌊padding ÷ 2⌋ on the left, the rest on the right · justify: spaces between words = (width − letters) ÷ gaps

Widths are monospace columns using Unicode East Asian Width, so 가 or 漢 counts two and an accent counts zero. With a space as the padding character, centred and left-aligned lines get no trailing spaces; with any other character both sides are filled. Justify spreads the leftover space over the gaps between words, giving the extra spaces to the leftmost gaps, and leaves the last line of each paragraph left-aligned, as typesetting does. Lines longer than the width are not cut.

Example

Centred in 20 columns, the sample becomes: “Menu” with 8 spaces in front, “Coffee 3.50” (11 columns) with 4, “Tea 2.80” with 6 and “Croissant 4.20” (14) with 3. Padding “42” on the left with zeros to 5 columns gives 00042.

Frequently asked questions

Why does my centred text look off in Word or on a website?

Those use proportional fonts, where letters have different widths, so space-based alignment cannot line up. Use the app’s own centring there; this tool is for monospace text.

How do I add leading zeros to a list of numbers?

Choose “Pad on the left with a character”, type 0 as the padding character and set the width to the number of digits you need, for example 5 for 00042.

What does justify do with the last line?

It leaves the last line of each paragraph (before a blank line or the end) left-aligned, because stretching a short last line looks wrong.

Last updated:

Cite or embed this tool
APA

kakaoCalc. (2026, November 8). Text Aligner (Centre, Right, Justify, Pad). https://kakao.mobile/tools/text-aligner/

MLA

“Text Aligner (Centre, Right, Justify, Pad).” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/text-aligner/.

Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms

Advertisement