Text Tools
Text Padder
Pad text or numbers with zeros, spaces, dots, or any character. Left pad, right pad, or center align lines, single strings, or one CSV column in your browser.
Padding mode
Treats the input as one line per row and pads each line independently.
Input
Padded output
0001 0012 0239 0004 0057 1024
Padding options
Direction
Pad character
Selected: 0
Target width
Presets
One-click setups for the most common search intents. Loading a preset replaces the input with a worked sample.
How to use
- Pick a mode: Pad each line for multi-row input, Pad a single string for one value, or Pad CSV column to pad one column of a delimited file.
- Choose a direction (Left for right-aligned numbers, Right for left-aligned text, Both to center) and a pad character (Zero is the default for numeric padding).
- Pick a target width: Match longest line auto-fits the column, Longest line + N adds extra characters, or Fixed width pads everything to an exact number.
- Paste your input on the left and read the padded result on the right. Stats show what was padded, what was already long enough, and what was truncated.
- For CSV column mode, pick the delimiter and the 1-based column number; only that column is padded, the rest of the row is untouched.
- Click Copy output to put the padded text on your clipboard. Your input is not uploaded.
About this tool
Text Padder pads text or numbers to a fixed character width using the same algorithm as JavaScript's String.prototype.padStart and padEnd. Pick a direction (left, right, or both to center), pick a pad character (zero, space, dot, dash, underscore, or any custom string), and pick a width strategy: a fixed number, the length of the longest line in your input, or the longest line plus a few extra characters. The tool runs in three modes. Pad each line takes a multi-line input and pads every row independently, perfect for zero-padding sequential IDs, aligning numbers into a tidy right-justified column, or building dot-leader tables of contents. Pad a single string treats the whole input as one value, useful for COBOL or mainframe imports and for filling fixed-width record fields. Pad CSV column splits each row on a delimiter (comma, tab, semicolon, or pipe), pads only the column index you pick, then puts the row back together, perfect for re-padding a postal code or zip code column that lost its leading zeros in Excel. Optional switches cover the common edge cases: Truncate if longer hard-cuts values that exceed the target width (off by default to match padStart semantics), Trim before padding strips leading and trailing whitespace before measuring, and Leave blank lines alone preserves the empty rows in your input. Live stats report the input character and line counts, the longest and shortest line, how many lines were actually padded, how many were already long enough to be untouched, and how many were truncated. One-click presets cover the most common search intents: zero-pad to three digits, four-digit sequential IDs, right-align a number column, left-align a label column, table-of-contents dot leaders, ASCII banner centering, and CSV postal code zero padding. The entire pipeline runs locally on your device using plain string functions, so the lists, IDs, exam answer keys, and exported spreadsheets you paste here never leave your browser.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Prefix and Suffix Lines
Add text to the start or end of every line, with presets for SQL, JSON, and Markdown.
Open tool
TextTab to Spaces Converter
Convert tabs to spaces or spaces to tabs with column-aware tab-stop expansion.
Open tool
TextAdd Line Numbers
Number every line with decimal, padded, Roman, alpha, hex, or Markdown styles.
Open tool
ConverterNumber Formatter
Format numbers with commas, locale grouping, accounting parens, scientific, compact, and custom rules.
Open tool
TextText Cleaner
Remove duplicate lines, blank lines, extra spaces, tabs, and invisible characters.
Open tool
TextCase Converter
Convert text between six common cases at once.
Open tool