Justify text formatter for a fixed line width
This justify text formatter breaks your paragraphs into lines of the width you choose, then spreads the spare spaces between the words so that the left and the right edge are both straight, like a column in a printed newspaper. You can decide what happens to the last line of each paragraph, set a first-line indent and a left margin, and copy the result as plain text. It is meant for fixed-width text such as README files, emails and terminal output.
Justify text formatter controls for gaps and rivers
Wide gaps are the usual problem with justified text, so the tool measures them. Set the widest gap you accept, and a line that needs more is listed, or left aligned instead.
How to use Justify Text Formatter
- Paste your paragraphs into the text box.
- Set the line width and what the last line of each paragraph should do.
- Choose how extra spaces are shared, the indent, the margin and the widest gap you accept.
- Solve the security check and press Justify text.
- Check the gap report, then copy the result or download it.
About Justify Text Formatter
Words are fitted greedily: each line takes as many words as fit in the width, with one space between them. The spare columns are divided by the number of gaps, and the remainder is handed out by the rule you pick. A line with one word cannot be justified and stays left aligned. Width is counted in display columns, and the gap character can be a normal space, a no-break space or a visible dot that shows where the gaps are.
Purpose of Justify Text Formatter Tool
Use it to prepare plain-text emails and documents, README files, code comments, terminal help text and typewriter-style layouts where both margins should be straight, or to see how a paragraph justifies before you choose a column width for a page.
Limitations of Justify Text Formatter
- The tool does not hyphenate words in plain text output, so lines with long words can show wide gaps. The gap limit lists those lines for you.
- Padding lines up only in a fixed-width font. In a proportional font the right edge looks ragged, even though every line has the same number of characters.
- In HTML output the browser does the justifying, so line breaks and gap sizes depend on the reader screen and font, and the plain-text rules do not apply.
- Lines are broken at spaces only. A very long word, such as a web address, is split or left over the width, depending on the break option.
- Text over 500,000 characters or 20,000 lines is refused to keep the page fast.
Privacy and data
Justify Text Formatter runs entirely in your browser. What you type or select is processed on your own device and is never sent to or stored on our server. See our Privacy Policy for details.
Frequently asked questions
How do I justify text online?
Paste your text, set the line width, choose what the last line does and press Justify text. Spaces are spread between the words so that every full line ends at the same column.
Why are some gaps in justified text very wide?
A line with few or long words has little to spread the spare space between. Raise the line width, break long words, or set the widest gap and choose to leave such lines left aligned.
Is the justify text formatter free and safe to use?
Yes. The justify text formatter is free to use and runs in your browser, so your text is not uploaded, stored or logged.
What is justified text?
Justified text is aligned to both the left and right edges, so every full line ends at the same column. This tool does it for plain text by spreading spaces between the words.
Can I justify text for HTML or a web page?
Yes. Choose the HTML output to get text with CSS text-align: justify, with optional hyphenation and a language setting.
Rate Justify Text Formatter
No ratings yet. Be the first to rate this tool.
Report a bug or give feedback
Popular tools
Morse Code to Text
Decode Morse code made of dots and dashes into readable text, with flexible separators and error marking.
Text ToolsWebpage URL to Text
Turn a web page address, pasted page source or an HTML file into clean readable text without ads and menus.
Text ToolsASCII to Text Converter
Decode decimal, hex or octal ASCII codes into text, with auto-detection, a code table, control-character names and clear errors for bad codes.
Text ToolsBinary to Text Converter
Decode binary into text as UTF-8, 7-bit ASCII or 16-bit UTF-16, with or without spaces, and find exactly what is wrong when it will not decode.
Text ToolsBMI Calculator
Work out your BMI, category and healthy weight range in metric or imperial units.
Health ToolsBullet List Generator
Turn lines, commas or sentences into a bullet, numbered or checklist, with nested levels, as text, Markdown or HTML.
Text Tools