Favorites

CSS word-spacing Property

word-spacing
CSS PropertyThis property is supported by all modern browsers.
Updated 22nd November 2026

The word-spacing property sets extra space between words.

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.

Description

The word-spacing property controls the amount of horizontal space the browser inserts between words — specifically the gaps that exist where text contains one or more whitespace characters. It is a typographic tool for adjusting the rhythm and density of a block of text: small increases can improve readability in tightly set type, while reductions can help squeeze more text into a constrained layout without changing font size. Note that word-spacing operates on inter-word gaps; it does not alter the spacing between individual glyphs inside a word (that is handled by letter-spacing).

Because browsers collapse and render whitespace according to layout rules, the visual effect of word-spacing depends on surrounding formatting decisions. The property's effect is applied to the spaces the renderer treats as word separators, so its visible result is influenced by how whitespace is handled in the document flow — for example, behavior governed by white-space — and by line-breaking and hyphenation strategies (see hyphens). When text is justified, word gaps may be stretched or compressed by the justification algorithm in addition to any explicit adjustments, so the interplay between word spacing and alignment can produce subtle or dramatic changes in text color and rag.

In practical use, designers apply word-spacing for typographic refinement: to improve horizontal balance in headlines, to adjust density for long-form reading, or to harmonize spacing across different fonts and languages. Large adjustments can affect legibility and the sense of rhythm, so they are often paired with other text properties to maintain overall harmony — for example, alignment settings like text-align and vertical metrics such as line-height. Use it judiciously, especially in multilingual contexts where script-specific spacing conventions and font metrics can cause the same adjustment to look very different.

Definition

Initial value
normal
Applies to
All elements
Inherited
Yes
Computed value
An absolute length
Animatable
Yes
JavaScript syntax
object.style.wordSpacing

Interactive Demo

Typography is the art of arranging type. Good spacing, line length and alignment make text easy to read on any screen.

Demo Code
HTML Code
<p class="demo-element">Typography is the art of arranging type. Good spacing, line length and alignment make text easy to read on any screen.</p>
CSS Code
.demo-element {
	width: 280px;
	margin: 0;
	padding: 12px 14px;
	border: 2px solid #4361ee;
	border-radius: 6px;
	background: #e7ecff;
	color: #1b1f3b;
	font-size: 16px;
	line-height: 1.5;
	word-spacing: normal;
}

Syntax

word-spacing: [ normal | <length> | <percentage>] 

Values

  • normalNo additional spacing is applied.
  • <length>Specifies extra spacing in addition to the intrinsic inter-word spacing defined by the font. Values may be negative, but there may be implementation-dependent limits.
  • <percentage>Specifies the additional spacing as a percentage of the affected character's advance measure.
  • inherit

Example

<div class="example">
<h1>CSS word-spacing demo</h1>
<p class="normal">This paragraph uses the default word spacing. The spacing between words is determined by the browser's default font metrics.</p>
<p class="wide">This paragraph increases word spacing using <code>word-spacing: 0.8em;</code> It creates more space between words for improved readability.</p>
<p class="tight">This paragraph decreases word spacing using <code>word-spacing: -0.15em;</code> Words appear slightly closer together.</p>
</div>
.example {
  font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;
  max-width: 700px;
  margin: 2rem auto;
  line-height: 1.6;
  color: #222;
}

.example h1 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.example p {
  margin-bottom: 1rem;
}

.normal {
  word-spacing: normal;
}

.wide {
  word-spacing: 0.8em;
}

.tight {
  word-spacing: -0.15em;
}
Open in editor

Browser Support

The following information will show you the current browser support for the CSS word-spacing property. Hover over a browser icon to see the version that first introduced support for this CSS property.

This property is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.