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 FormatterOne click turns a messy paste into a clean article: paragraphs rejoined, indentation applied, punctuation width normalized and CJK-Latin spacing fixed.
- 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.
- Add Quotes to Each LineTurn a pasted list into a paste-ready JSON array, SQL IN clause or CSV row in one click, with the escaping each format actually requires.
Text Tools guides
View all- How to Add Text in iMovie With Exact-Length Labels
- How to Add Text in DaVinci Resolve With Exact-Length Labels
- How to Add Text in CapCut With Exact-Length Labels
- Pad Canva Text to a Fixed Unicode Code-Point Length
- Add a Text Box in Word With Exact-Length Padded Text
- How to Add Text Box in Canva With Exact-Length Text
- Vertical Text Generator Bulk: Arrange Text in Columns
- Extract Links From Text: Normalize and Deduplicate URLs
- Upside Down Text Bulk: Flip Pasted Text at Once
- Convert to Title Case Online: AP, APA, Chicago, MLA
- Text to Slug Example: ASCII and Unicode Outputs
- How to Sort Text Numbers in Excel: Natural Order
- How to Reverse Text in Word 2007: Keep Characters Intact
- How to Repeat Text in WhatsApp Without Retyping
- Generate Text from Pattern: Numbers, Steps & Padding
- Split Text File Content Into Numbered TXT Chunks
- Combine TXT Files Online: Control Every Boundary
- Text Diff Checker Alternative for Line-by-Line Review
- Switch First and Last Name in Excel Using Formula
- Strikethrough Text Command Line vs Online: Which Works?