Line Formatting Tools

Center Text Online

Center each line within a fixed width.

PrivateYour text is processed on your device and never uploaded.
Input
Result
0 chars · 0 lines

Centering plain text by adding spaces by hand never stays even, especially when lines differ in length.

Center Text pads each line so its midpoint sits at the center of the width you choose.

How to use Center Text Online

  1. Paste the lines you want centered into the input box.
  2. Set the width, and Center Text adds leading spaces so each line is centered within it.
  3. Copy the centered text, or download it as a .txt file.

Use cases

Good to know

Center Text places leading spaces before each line so its center matches the chosen width. It measures display width, so wide characters are counted correctly, and lines already wider than the width are left unchanged.

Frequently asked questions

Why is a line off-center by one space?

When the spare width is an odd number it cannot split evenly, so the extra column goes to one side.

Does Center Text add spaces on the right too?

No. It adds only the leading spaces needed to center the line, which keeps the result clean to copy.

What width should I use for a terminal?

Match it to your terminal columns, often 80, so the centered text appears balanced in that view.

Related Line Formatting Tools