CSS text-justify Property
Description
The text-justify property controls the algorithm a user agent uses to distribute extra inline space when a block of text is justified. It comes into play only when the alignment of lines is set to produce flush edges (for example, when text-align is set to justify), and its role is to determine how to spread or compress spacing within the line box so both edges appear aligned. Rather than specifying whether text is justified, it governs the technique the renderer applies to achieve that visual result.
Because justification can be achieved in multiple ways, the property influences whether the renderer adjusts inter-word gaps, modifies inter-character spacing, stretches glyphs (in some typesetting systems), or combines several tactics. That interaction often affects how hyphenation is used to avoid excessive gaps; accordingly, justification behavior is closely related to the settings for hyphens, which can allow or restrict breaking words to improve line fit. It also interacts with explicit spacing controls such as word-spacing and letter-spacing, because those properties establish baseline spacing that the justification algorithm may adjust from.
Practical consequences of different justification approaches include changes to perceived density, the emergence of "rivers" of white space through paragraphs, and legibility differences across languages and fonts. For scripts like East Asian text, justification frequently uses character redistribution or glyph-level adjustments rather than only expanding spaces between words, so the property’s effect depends on the script, font metrics, and line-breaking rules. Settings that favor larger inter-word gaps can harm reading rhythm in narrow columns, while choices that rely on tighter character spacing can make text look cramped; authors should consider the impact on readability for the target language and layout.
Finally, the property does not operate in isolation: it can be influenced by how white-space handling is configured and whether the layout allows flexible wrapping or forces unbroken lines. For example, interactions with white-space and the treatment of the last line (as affected by text-align-last) determine when and where the justification algorithm is applied and whether the last line receives the same distribution rules. Because justification decisions are ultimately renderer-dependent, testing with representative content and languages is the best way to confirm the visual and accessibility outcomes you want.
Definition
- Initial value
- auto
- Applies to
- block containers and, optionally, inline elements
- Inherited
- Yes
- Computed value
- Specified value
- Animatable
- No
- JavaScript syntax
- object.style.textJustify
Syntax
text-justify: auto | none | inter-word | distribute
Values
- autoAllows the browser to determine which justification algorithm to apply.
- noneJustification is disabled.
- inter-wordJustification adjusts spacing at word separators only (effectively varying the used word-spacing on the line). This behavior is typical for languages that separate words using spaces, like English or Korean.
- inter-characterText is justified by adjusting the space between characters, maintaining consistent word spacing. This can result in irregular word spacing but even character spacing.
- distribute DeprecatedJustification adjusts spacing between each pair of adjacent characters (effectively varying the used letter-spacing on the line). This value is sometimes used in Japanese.
Example
Browser Support
The following information will show you the current browser support for the CSS text-justify property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported in some modern browsers, but not all.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
