Skip to content
Tezmy Tools

Text Formatter

Word wrap, centre, justify, truncate, number and repeat text

Runs in your browser. Nothing is uploaded.

About the Text Formatter

Tezmy's Text Formatter reshapes plain text with one choice from a menu. Word wrap breaks long lines at a width you set so text fits an email, a terminal or a code comment. Left, centre and right alignment pad each line to a width with spaces or a character you pick. Justify stretches lines to a full width. Truncate cuts long lines and adds an ellipsis, Number adds 1., 2., 3. in front of each line, and Repeat copies a piece of text as many times as you need with any separator. The result appears beside your text and uses a fixed-width font, so you can see how the lines line up. Width is counted in characters, and an emoji counts as one.

Updated September 2026

How to use the Text Formatter

  1. 1Choose what to do from the “What to do” menu.
  2. 2Paste or type your text in the left box.
  3. 3Set the options that appear for that choice, such as the line width.
  4. 4Copy the result or download it as a text file.

When plain-text formatting helps

Plain text has no styles, so the only tools you have for layout are line breaks and spaces. That is exactly what people need when writing a commit message, a README, a code comment, a plain-text email, a caption for a terminal program or a message that will be pasted into a chat. Keeping lines to a fixed width makes them easy to read in narrow windows and in email clients that do not wrap.

The other actions solve small chores: centring a title in a text banner, right-aligning a column of numbers, numbering a list that was pasted without numbers, or repeating a line to fill a test file.

Choosing the right action

  • Word wrap: best for paragraphs. Common widths are 72 for email, 80 for code and terminals and 100 to 120 for wide editors.
  • Align left, centre, right: pads each line to a width. Use a dot or a dash as the fill character to make simple leader lines.
  • Justify: makes a clean column edge on both sides. It works best with wide lines; in narrow widths the gaps get large.
  • Truncate: shortens titles or file names to a limit. The ending counts as part of the width, so width 10 with an ellipsis keeps nine characters.
  • Number the lines: adds 1., 2., 3. and aligns the numbers so a list of ten or more stays tidy.
  • Repeat: copies the text with any separator, handy for test data or patterns.

Good to know

Widths count characters, not pixels. Fixed-width fonts make each character the same width, so the result looks right in a code editor or terminal but may not in a word processor. Characters outside the basic Latin set, such as accented letters and emoji, each count as one. Some symbols, such as Chinese characters, are drawn twice as wide in a monospace font, so lines containing them may look longer than their character count.

Tabs are not converted. If your text contains tabs, replace them with spaces first in a text editor before formatting. To remove repeated lines use Remove Duplicate Lines, and Sort Lines puts the rest in order.

Features

  • Eight formatting actions in one tool
  • Word wrap keeps words whole, with an option to break very long ones
  • Padding alignment with your own fill character
  • Justify spreads spaces evenly between words
  • Truncate with any ending you choose
  • Line numbers from any starting number, and repeat with a separator

Frequently asked questions

How do I wrap text to 72 or 80 characters?

Choose Word wrap, set the line width to 72 or 80 and paste your text. Each paragraph is wrapped on its own, so blank lines between paragraphs stay where they are. These are the usual widths for email and source code.

Does word wrap join my lines first?

It wraps every line you give it separately. A line that was already short stays short; it is not joined to the next one. Use the Remove Line Breaks tool first if you want to merge broken lines into one paragraph before wrapping.

Why does centred text look uneven in some places?

Centring uses spaces, so it only lines up in a fixed-width (monospace) font, like the result box here. In a proportional font the letters have different widths and the padding will look off. If the gap is an odd number, the extra space goes on the right.

What does justify do with the last line?

Justify spreads the spaces in each full line until it reaches the width you set, as in a printed column. The last line of each paragraph, and lines with a single word, are left as they are, which is the normal way to do it.

Can I truncate text at a word instead of a character?

This tool cuts at an exact number of characters, counting the ending you add. To keep whole words, use Word wrap instead and take the first line.

How many copies can I repeat, and can I use a new line as the separator?

Up to 1,000 copies. Type \n in the separator box for a new line and \t for a tab. The result is limited to a couple of million characters so the page stays responsive.

Is my text uploaded?

No. All formatting happens in your browser and nothing is sent or stored.

Related tools