Left-aligned padding via padEnd
Width is the target column count. Lines shorter than Width are extended on the right with the Char fill until they hit the target. Lines already at or beyond Width are returned unchanged. Char defaults to a space; if you supply a multi-character string only the first character is used.
Per Line is on by default and applies the pad to every line independently. Turn it off to pad the whole input as one continuous string. Width is bounded by the registry to 1 through 200.
Common uses: building fixed-width text columns for a manual table, lining up labels followed by trailing dots (Char .), or producing TOC-style entries. To remove the padding later run trim whitespace or strip via regex replace.
How to use pad text on the right
- 1Paste your lines into the input panel on the left.
- 2Set Width to the number of characters each line should reach.
- 3Type the fill character into Char. Only the first character is used.
- 4Leave Per Line on (the default) to pad each line; turn it off to pad the whole input as one string.
- 5Click Copy or Download in the output header.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
What this tool actually does
Backed by padEnd
The pad call is line.padEnd(width, char). JavaScript repeats the fill char as needed to hit Width; if the line is already long enough, it is returned untouched.
Only the first character of Char is used
If you type -- the fill becomes -. The implementation takes char.charAt(0) so the output never overshoots the width by partial repeats.
Empty Char falls back to space
If Char is left blank the tool substitutes a regular space. To pad with non-space, type the visible character you want.
Per Line is on by default
Each line is padded independently. Turn the toggle off to pad the whole input as one string; line breaks count toward the width.
Width is bounded 1 to 200
The registry caps Width at 200 so the output stays manageable in the browser.
Worked example
Width 16, Char ., Per Line on. Each label is padded out to 16 columns with trailing dots.
name email phone
name............ email........... phone...........
Settings reference
| Behaviour | Effect on output |
|---|---|
| Width (1-200) | Target column count. Lines below the width grow; lines at or above pass through. |
| Char populated | First character is used as the fill. Multi-char input is truncated to the first char. |
| Char empty | Falls back to a single space. |
| Per Line on (default) | Each line is padded independently; line breaks are preserved. |
| Per Line off | The whole input is padded as one string; line breaks count toward the width. |
| Line already at or above width | Returned unchanged. |
| Line endings | CRLF input becomes LF output (split/join in per-line mode). |
FAQ
How do I make TOC-style trailing dots?
. and pick a Width wide enough for your longest label. Each shorter label gets dots appended to fill the column.Why does Char only use one character?
padEnd takes a single fill char in this tool. The registry treats the field as a single fill character; the implementation reads char.charAt(0).What if my line is already wider than Width?
padEnd never truncates; for shortening use truncate text.How do I pad the left side instead?
Does anything upload?
padEnd runs in your browser. Your text never leaves the page.