Text Aligner

Align and indent your text left, right, or center with any fill character.

Align and Indent Text

Align every line of your text to the left, right, or center within a fixed or auto column width.
Choose any fill character, add an indent, and let Live mode update the output as you type.


Load an example

1. Alignment & width
(1–500)
Auto width aligns every line to the longest one.
2. Fill character & indent
single character to pad with
spaces to add before each line
Keeps blank lines blank instead of padding them.
Ready to align your text.

Overview

Text alignment is the practice of giving every line in a block the same visual width by padding shorter lines with a repeating fill character. Our Text Aligner combines left-alignment, right-alignment, and center-alignment into a single, browser-based tool: pick your alignment, set the column width (or let the tool detect the longest line automatically), choose any fill character, and add an optional indent before each line.

The result is perfectly aligned plain text ready for code comments, console output, plain-text invoices, menu lists, CSV-style tables, or any context where a proportional font would never line up on its own. Everything runs in your browser — your text never leaves your computer.


What This Tool Does

Alignment on demand: Choose left, right, or center alignment and the tool pads every line with the fill character you specify. Right alignment keeps numbers and IDs flush, left alignment builds dot leaders, and center alignment makes headings or chapter titles stand out. Left alignment also removes uneven leading whitespace first, so text that was previously centered or right-aligned snaps to a clean left margin.

Auto or fixed widths: Auto mode measures the longest line and aligns everything to it instantly. Fixed mode lets you set an exact column width (up to 500 characters) when you already know the size you want.

Indentation built-in: Add 0–20 leading spaces before any alignment happens. This is ideal for nested bullet lists, threaded notes, or code comments that need a consistent margin.

Live mode + undo/redo: Leave Live mode on and the output updates with every keystroke or setting change. Need to revisit an earlier state? The undo/redo buttons work just like a text editor.


Key Features & Examples

1. Left Alignment with Dot Leaders
Input:
Espresso\nCappuccino\nCafé au Lait
Settings: Alignment = Left, Width = Auto, Fill = ., Indent = 0.
Output (every line padded to the longest one, 12 characters):
Espresso....
Cappuccino..
Café au Lait

2. Right Alignment with Zero Padding
Input:
79
1024
5

Settings: Alignment = Right, Width = Auto, Fill = 0.
Output (every line padded to the longest one, 4 characters):
0079
1024
0005

3. Centered Headlines with Dash Fill
Input:
Chapter One
Chapter Two
Epilogue

Settings: Alignment = Center, Width = Fixed (20), Fill = -.
Output (odd numbers of dashes get the extra dash on the right):
----Chapter One-----
----Chapter Two-----
------Epilogue------

4. Indented Notes
Input:
Completed backup
Verified logs
All services running

Settings: Alignment = Left, Width = Auto, Fill = space, Indent = 4.
Output (each line also gets invisible trailing spaces up to the longest line):
    Completed backup
    Verified logs
    All services running


How to Use the Text Aligner

Paste or upload your text: Use the input textarea or drop a .txt/.rtf file to load up to 50,000 characters.

Pick an alignment: Select left, right, or center in the Alignment dropdown.

Set the width: Leave Width mode on Auto for instant detection, or switch to Fixed and enter the exact column width you want.

Choose fill & indent: Enter any single character (space, dot, dash, zero, etc.) and optionally add leading spaces before alignment happens.

Keep or skip blanks: Leave “Skip empty lines” on to keep blank lines untouched.

Apply or edit on the fly: Click Align Text or keep Live mode enabled; use Undo/Redo as needed and copy/download the aligned result.


Examples

Every example below loads its own text and settings - click "Try it" and the tool does the rest.

1. Café menu dot leaders

With Alignment set to Left, Width mode on Auto and a dot as the fill character, each drink name is padded with dots up to the longest line (Café au Lait, 12 characters).

Input
Espresso
Cappuccino
Café au Lait
Mocha
Output
Espresso....
Cappuccino..
Café au Lait
Mocha.......

2. Product codes with zero padding

Right alignment with Auto width and a zero fill pushes every code to the right edge of the longest one (SKU-4521, 8 characters), so the codes line up for sorting or lookup.

Input
SKU-78
SKU-1024
SKU-3
SKU-4521
Output
00SKU-78
SKU-1024
000SKU-3
SKU-4521

3. Centered chapter titles

Center alignment with a fixed width of 26 and a dash fill balances each heading between two dash runs; odd numbers of dashes put the extra dash on the right.

Input
Chapter 1
Chapter 2
Epilogue
Output
--------Chapter 1---------
--------Chapter 2---------
---------Epilogue---------

4. Indented maintenance notes

A four-space indent is added before each line, then left alignment with Auto width and a space fill pads every line to the longest note; Live mode keeps the output updated as you edit.

Input
Completed backup
Verified logs
All services running
Output
    Completed backup
    Verified logs
    All services running

FAQs

FAQ 1: What does Auto width do?
Answer: Auto width measures the longest line (after indenting) and aligns every other line to that width. You get perfect alignment without guessing numbers.

FAQ 2: Can I align text without touching blank lines?
Answer: Yes. “Skip empty lines” leaves blank lines unchanged and only pads non-empty lines.

FAQ 3: What happens if a line is longer than the chosen width?
Answer: The tool never truncates or wraps your text. Lines longer than the target width keep their full length; left alignment still cleans their leading whitespace.

FAQ 4: Does the fill character have to be a single character?
Answer: Yes, to guarantee predictable alignment. Enter a space, dot, dash, underscore, or any single character; the tool repeats it as many times as needed.

FAQ 5: What is the Indent option for?
Answer: Indent adds the chosen number of spaces before every line, useful for nested lists, changelog entries, or code comments that need a shared margin.

FAQ 6: Is any text uploaded to your server?
Answer: No. The alignment runs entirely in your browser. Files you upload are read locally, and nothing is sent to the server.

FAQ 7: Can I download the aligned result?
Answer: Yes. Use the Download link under the output textarea to get a .txt file, or click Copy to send the aligned text to your clipboard.


Tools Worth Trying

TextToolz

The Ultimate Text Tools

TextToolz works seamlessly to let you convert and design your text. It is fast, reliable and secure. Trusted by thousands of users.