How to use the Text Padder
- Paste your text into Your text, one value per line.
- Set Width in characters (1 to 1,000). The default is 12.
- Choose Align text: Left (pad right), Right (pad left) or Centre.
- Type a Pad character. A space is the default; 0, ., -, * and = are common choices.
- Copy the padded lines. The output uses a monospaced font so you can see the columns line up.
What it does and when to use it
Padding makes every line the same width. That matters wherever text is laid out by character position instead of by a table:
- Leading zeros for invoice numbers, IDs and file names, so 7 sorts after 6 and not after 69 when sorted as text.
- Fixed-width data files, where each field must take up an exact number of characters.
- Plain-text tables and receipts, with labels padded on the right and amounts on the left so they line up.
- Banners and headings in code comments or terminal output, such as ===MENU====.
- Dot leaders in tables of contents and menus.
A useful pattern for a two-column plain-text table: pad the labels left-aligned in one run, pad the numbers right-aligned in another, then put them side by side.
If you want numbers in front of lines, Add Line Numbers has its own zero-padding option. To limit lines to a maximum length rather than fill them to a minimum, use the Text Truncator. For the same text on every line, see Add Prefix/Suffix.
How it works
Each line is measured in visible characters. The gap is the width minus that length. If the gap is zero or less, the line is unchanged. Otherwise:
- Left adds the whole gap after the text;
- Right adds it before the text;
- Centre puts half the gap (rounded down) before and the rest after.
The gap is filled with the first character of your pad character. Lines are processed independently and joined in their original order. Nothing is sent from your browser.
Worked examples
Leading zeros. The lines 45, 312 and 7 at width 5, right-aligned with 0, become 00045, 00312 and 00007.
A heading banner. “MENU” at width 11, centred with =, gives ===MENU====. The gap of 7 splits as 3 before and 4 after.
Dot leaders. “Item” and “Qty” at width 8, left-aligned with a dot, become “Item….” and “Qty…..”, both 8 characters long, ready for a value after them.
Limits and tips
- Empty lines are padded too: they become a full row of the pad character.
- Tabs count as one character, but display wider. Convert them with Tab to Spaces before padding.
Frequently asked questions
What happens to a line that is already longer than the width?
How do I add leading zeros to numbers?
Where does the extra character go when centring?
Can I pad with two characters, like "-="?
Are accented letters and emoji measured correctly?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.