Text Padder
Pad text to an exact Unicode code-point length on the left, right, or both sides with a custom repeating string.
Privacy: your files never leave your device. All processing happens locally in your browser.
How to use
- 1.Enter the source text and the exact target length in Unicode code points.
- 2.Type a nonempty padding pattern and choose left, right, or both sides.
- 3.Pad the text, verify the reported length and preview, then download the TXT result.
About Text Padder
Text Padder extends a string to an exact target length by adding a padding pattern on the left, right, or both sides. Enter the original text, choose a target from zero through 1,000,000 Unicode code points, supply any nonempty padding text, and select the side. The complete output appears for review and can be downloaded as a UTF-8 TXT file. Processing stays inside the current browser tab and no text is uploaded to Lizely.
Right padding keeps the source at the beginning and adds characters after it. Left padding adds characters before the source. Both sides divides the missing length between the two edges. When an odd number of characters is needed, the left receives the smaller share and the right receives the extra character. That rule is fixed, visible, and deterministic.
The padding text can contain one or several Unicode code points. It repeats from its first character as often as needed and is truncated exactly at the target. For example, padding “cat” from length three to length eight with the pattern “-_” on both sides produces two padding characters on the left and three on the right. No extra complete pattern is appended beyond the requested length.
Length is measured with JavaScript string iteration, which counts Unicode code points rather than UTF-16 code units. Most emoji therefore count as one instead of two. A combining mark still counts separately from its base character, and a multi-code-point emoji sequence can count as several. The result states this code-point model explicitly so it is not confused with visual glyphs, bytes, words, or grapheme clusters.
If the source already meets or exceeds the target, it is returned unchanged. The tool never truncates text to force a shorter result. Set a larger target when padding is required. A zero target is valid but leaves nonempty source text unchanged under the same no-truncation rule.
Padding text must not be empty when characters need to be added. Spaces, line breaks, punctuation, emoji, and multi-character patterns are accepted because they are ordinary visitor-supplied text. Invisible padding can be difficult to inspect, so use the reported length and download only after checking the preview.
The target must be a non-negative whole number. Decimal, negative, missing, and nonnumeric values are rejected. The one-million-code-point ceiling bounds memory use, repeated concatenation, preview rendering, and download creation. Input longer than the ceiling is not expanded, but the target itself cannot exceed the documented limit.
This tool is useful for fixed-width labels, simple identifiers, test fixtures, aligned plain-text fields, display mockups, and adding consistent borders around short strings. It does not understand terminal display width. East Asian wide characters, emoji, tabs, combining sequences, and proportional fonts can occupy widths that do not match their code-point count.
Do not treat the output as byte padding for a binary protocol, database column, cryptographic block, or encoded file. UTF-8 characters can use different byte counts, and a code-point target does not guarantee a byte target. Use a format-aware byte utility when a specification defines storage length rather than text length.
The download button creates a temporary Blob URL only when clicked, starts the browser download, and schedules immediate revocation. The original text remains in the editor for comparison. Changing any field clears the previous result so an old preview cannot be mistaken for the new settings.
The operation uses no dictionary, network request, random source, or external dataset. The same accepted source, target, pattern, and side always produce the same string. Review whitespace-sensitive output carefully before replacing source material, because visually subtle padding is still real text.
Methodology & sources
Iterate source and padding strings by Unicode code point, validate a whole-number target from zero through 1,000,000, return source unchanged when already long enough, repeat and truncate the visitor-supplied pattern to the exact missing length, place all padding left or right or split it with the odd remainder on the right, preview the deterministic output, and create a short-lived UTF-8 Blob URL only when download is clicked.
Frequently asked questions
- Will shorter target lengths truncate my text?
- No. Text that already meets or exceeds the target is returned unchanged.
- How is both-sides padding divided?
- The missing length is split evenly; when it is odd, the right side receives the extra code point.
- Does one emoji count as one character?
- A single Unicode code point does, but combining sequences and joined emoji can contain multiple code points.
- Is the text uploaded?
- No. Padding, previewing, and TXT download creation happen locally in the browser.
Related tools
- Character CounterCount characters in real time and instantly see how much room is left for X/Twitter, SMS, Instagram, and SEO meta tags.
- Add Prefix and Suffix to LinesAdd literal prefix and suffix text to every pasted line, with an option to leave blank lines untouched.
- Text FormatterApply only selected line trimming, horizontal whitespace collapse, and blank-line limits while leaving words and punctuation untouched.
- Text RepeaterRepeat exact text up to 10,000 times with a custom separator while preserving multiline content and every boundary character.
- Add Line Numbers to TextNumber every line of pasted text from a chosen starting value with a custom separator and optional zero padding.
- APA Citation GeneratorBuild correctly formatted APA 7th edition references for websites, books, journals, and newspapers in seconds.
Text Tools guides
View all- Remove Emoji from Any Text Without Losing Formatting
- Yes, You Can Copy and Paste Emojis Anywhere in One Click
- How to Extract Email Addresses From Excel Cells
- Count Text Occurrences in Excel Without Formulas
- Count Characters in a String in Python (Plus Real-Time Counts)
- How to Change Case in an Excel Sheet Without Formulas
- Make LinkedIn Posts Stand Out with Bold Text
- Add a Prefix to All Lines in a File on Linux the Easy Way
- How Do I Add a Number to Text on Every Line
- How to Reverse Text Without Breaking Emojis
- How to Copy Special Characters with Unicode Names and Codes
- Count Lines in a File in Linux Without Command-Line Hassle
- Remove Line Break Symbols in Outlook Without Losing Formatting
- Extract Email Addresses from a Cell in Excel in One Click
- How to Generate Random Words in Excel
- How to Emoji Copy and Paste From Any Browser
- How to Generate Lorem Ipsum Online
- How to Create a Random List in Excel Without Formulas
- How to Use Kaomoji: Copy and Paste Japanese Emoticons
- Count Characters in a Cell in Excel and Beyond for Social Media