Left-pad Text Tool adds characters to the beginning of each line so the total line length matches a specified width. You can choose the padding character and trim the input lines before padding. The tool ensures consistent alignment for numbers, text, or any data needing right alignment.
How to Use:
- Paste your text into the input box or import a
.txt
file using the Choose File button. - In the Options section:
- Set the Pad to Width value to define the total line length.
- Enter the Pad Character (e.g. space,
0
,.
) to fill the padding. - Toggle Trim lines to remove leading and trailing whitespace from input lines before padding.
- The padded output will update live in the right-hand output box.
- Use Copy Output to copy the result.
- Use Export to File to save the output as a
.txt
file. - Click Clear All to reset input, output, and file state.
Example:
Input:
42
7
123
9999
1
Pad to Width: 6
Pad Character: 0
Trim lines: Enabled
Output:
000042
000007
000123
009999
000001
Common Use Cases:
Use Left-pad Text Tool to align numbers, format fixed-width outputs, create structured code displays, or prepare content for systems that expect right-aligned, equal-width fields. It’s ideal for CSV, TSV, or data entry alignment in terminal-based applications.
Useful Tools & Suggestions:
Once you’ve added left padding, Left-align Text helps everything snap into place visually great if you’re prepping structured layouts or clean displays. And if the spacing starts looking off, Normalize Text Spacing smooths things out so your padded lines stay tidy.