Text & String Utilities100% Client-Side

Justify Plain Text Paragraphs

Paste prose to wrap it and distribute extra spaces between words across most lines. Blank lines divide the input into paragraphs. The tool leaves the last line of each paragraph with normal spacing, and single-word lines keep that word by itself. This is useful when preparing plain text for a monospaced display, such as a terminal message or an excerpt in a fixed-width document.

Configuration Options
Input
21 chars•1 lines
Output

How to Use the Justify Text Online to a Fixed Width

  1. 1Paste the paragraphs and keep a blank line wherever a new paragraph begins.
  2. 2Set Line Width from 20 through 200.
  3. 3Review the spacing where long words leave fewer opportunities to distribute padding.
  4. 4Copy the text into a monospaced view that preserves repeated spaces.

Input & Output Examples

At width 20, the first line has two gaps of four spaces and the last line stays as one word.

Input Sample
red blue green yellow
Expected Output
red    blue    green
yellow

At width 20, the first two gaps receive the extra spaces. The blank line separates the second paragraph.

Input Sample
one two three four five

new block
Expected Output
one  two  three four
five

new block

Practical Developer Workflows

  • Prepare a short justified paragraph for a text-only document.
  • Compare how a paragraph looks at two widths before setting a terminal layout.
  • Create a fixture where extra interword spaces must be preserved by a renderer.

Zero Server Uploads & Complete Privacy

Runs 100% in your browser; no data is uploaded to any server.

Notice a bug, calculation error, or outdated info?

Let us know directly so our engineering team can fix it.

Frequently Asked Questions

The final line of each paragraph is joined with a single space between words. This keeps short endings readable without stretching their gaps. Other lines with at least two words can receive additional spaces to reach the target.

Explore Other Tools

12 suggested tools

View all tools