# Text Pad & Align

Pad text to a fixed width and align it left, right, center, or justified, with a chosen pad character.

> Canonical page: https://elysiatools.com/en/tools/text-pad

- **Category:** Text Processing

- **Keywords:** text pad, pad text, align text, text align, left align, right align, center text, justify text

## Overview

Pad and align text to a fixed width — add filler characters so each line reaches a target column count, with a choice of how the text sits inside that block.

**Alignment modes:**
- **Left** — text starts at the left, padding added on the right. `"hi" → "hi      "` (8-wide).
- **Right** — text ends at the right, padding added on the left. `"hi" → "      hi"`.
- **Center** — text sits in the middle, padding split between both sides (extra pad goes on the right for odd remainders). `"hi" → "   hi   "`.
- **Justify** — for *multi-line* input, full-justify every line except the last: words are spread so the line reaches the target width with spaces distributed between them (newspaper-column look).

**Options:**
- **Target width** — the column count each line is padded/aligned to (1–200).
- **Pad character** — the character used to fill the gap. Defaults to a space; common picks are `-`, `=`, `.`, or `0`.

**Good to know:**
- Lines already at or past the target width are returned unchanged for left/right/center (you can't shrink text by padding).
- Justify needs at least two words on a line to spread; single-word lines are left-aligned.
- Width is measured in characters (Unicode code points), so CJK characters each count as one column — pair with a monospace display for visual alignment.

## Inputs

- **Text** (textarea): Type text to pad and align...
- **Alignment** (select)
- **Target width** (number): e.g. 20
- **Pad character** (text): space (default)

## When to use

- When formatting plain-text tables, code comments, or terminal outputs that require uniform column widths.
- When creating visual text banners, headers, or dividers using custom padding characters like hyphens or dots.
- When preparing multi-line text blocks with newspaper-style full justification for monospace displays.

## How it works

- Enter or paste your multi-line text into the input area.
- Set your target column width and select your preferred alignment mode: left, right, center, or justify.
- Specify a custom padding character, such as a space, hyphen, or dot, to fill the remaining width.
- The tool processes each line individually, adding the padding character to reach the target width.

## Use cases

- Aligning numeric columns to the right for clean financial or tabular text reports.
- Generating centered headers wrapped in hyphens or equal signs for code documentation.
- Formatting plain-text paragraphs to a justified layout for terminal-based readmes.

## Frequently asked questions

### What happens to lines that are already longer than the target width?

Lines that meet or exceed the target width remain unchanged when using left, right, or center alignment.

### Can I use multiple characters as the padding character?

No, the tool uses a single character to fill the remaining column width.

### How does the justify alignment handle single-word lines?

Single-word lines cannot be justified and will default to left alignment.

### Does this tool support CJK characters?

Yes, CJK characters are counted as single columns based on Unicode code points.

### Can I shrink my text using this tool?

No, this tool only adds padding to reach a target width; it does not truncate or shrink text.

## Related tools

- [Text Justifier](https://elysiatools.com/en/tools/text-justifier): Quickly stretch spaces between words to make all text lines equal length
- [Text Left Aligner](https://elysiatools.com/en/tools/text-left-aligner): Quickly align text to the left side
- [Text Right Aligner](https://elysiatools.com/en/tools/text-right-aligner): Quickly align text to the right side
- [Podcast Chapter Marker Builder](https://elysiatools.com/en/tools/podcast-chapter-marker-builder): Build every podcast chapter format from one timecoded list: Podcasting 2.0 JSON + RSS tag, ID3v2.4 CHAP+CTOC burned into an MP3, Vorbis comments, mp4chaps, YouTube timestamps and SRT, with a per-player support matrix.
- [Header Adder](https://elysiatools.com/en/tools/header-adder): Add headers to CSV data that lacks column names. Perfect for data import from databases, API responses, or numeric datasets that need proper column identification. Features: - Add custom headers to header-less data - Auto-generate intelligent headers - Support for various header naming conventions - Preview headers before applying - Multiple header format options - Support for existing data detection - Batch processing capabilities Common Use Cases: - Fix database exports without headers - Process API response data - Prepare numeric datasets for analysis - Standardize data column naming - Create proper CSV structures - Data format normalization
- [JavaScript Deobfuscator](https://elysiatools.com/en/tools/javascript-deobfuscator): Deobfuscate and analyze obfuscated JavaScript code to improve readability and understanding
- [Adaptive 12-Point Hidden Watermark](https://elysiatools.com/en/tools/adaptive-12-point-hidden-watermark): Add a subtle text watermark to one image or every supported image in a ZIP, at all, random, or chosen perimeter positions with automatic dark/light local contrast.
- [Batch Image Watermark](https://elysiatools.com/en/tools/batch-watermark): Add watermarks to multiple images with text or image watermarks, position control, and batch processing

## Samples

- [Text with Emoji Samples](https://elysiatools.com/en/samples/text-with-emoji-samples): Mixed language text containing various Unicode emojis for testing emoji extraction
- [Text Case Format Samples](https://elysiatools.com/en/samples/text-case-formats): Examples of different text case formats: camelCase, snake_case, kebab-case, PascalCase, and more
- [Chinese-English Mixed Text Samples](https://elysiatools.com/en/samples/text-chinese-english-mixed-samples): Sample text files with mixed Chinese and English content for testing automatic spacing tools
- [Text with Chinese Samples](https://elysiatools.com/en/samples/text-with-chinese-samples): Mixed language text containing Chinese characters for testing Chinese extraction

## Related content

- [Text Case Conversion and Fixed-Width Alignment](https://elysiatools.com/en/hubs/text-case-conversion-and-alignment-tools): Convert identifier-like text to a target naming convention, wrap it to a chosen line width, then align or pad the finished lines for readable plain-text output.
