Support0

CSS letter-spacing playground

Explore letter-spacing with controls for spreading out or tightening characters on a real text block and checking how readability changes.

Ask AI

CSS letter-spacing playground

Response generated with openai/gpt-5.4-nano. AI can make mistakes. Always review the result.

BaselineLab lets you compare letter-spacing with real text, normal spacing, positive and negative lengths, and percentages defined by CSS Text Level 4. Adjust spacing carefully: too little or too much can make text harder to read.

HTML
<p class="letter-spacing-sample">
  BaselineLab lets you compare letter-spacing with real text,
  normal spacing, positive and negative lengths, and percentages defined by CSS Text Level 4.
  Adjust spacing carefully: too little or too much can make text harder to read.
</p>
Tailwind CSS
Examples for Tailwind CSS 4.3 with the default theme. Custom values keep arbitrary classes when there is no equivalent utility. Changing the theme can change utility values.
<p class="max-w-2xl text-2xl font-bold leading-normal tracking-[0.08em]">
  BaselineLab lets you compare letter-spacing with real text,
  normal spacing, positive and negative lengths, and percentages defined by CSS Text Level 4.
  Adjust spacing carefully: too little or too much can make text harder to read.
</p>
CSS
.letter-spacing-sample {
  max-inline-size: 38rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.45;
}

Educational guide to letter-spacing

Adjust spacing without losing the word

Compare normal, positive, and negative tracking. Learn what inherits, how each unit scales, and why the same setting does not suit every writing system.

Mental model

letter-spacing adds or removes space between typographic units of text. This adjustment is called tracking: it preserves letter shapes and changes how much space the text occupies on the line.

  1. Font and shape

    Glyphs, their metrics, and kerning provide the starting spacing. Kerning adjusts specific pairs, such as AV.

  2. Added space

    A positive value opens up the text; a negative one tightens it. The adjustment affects units recognized by the shaping engine, rather than each Unicode code point separately.

  3. Line layout

    Changing text width can change line breaks. Use word-spacing for the space between words and gap to separate boxes.

Static diagram of trackingThe browser lays out the text using the font and the requested spacing. The original text stays intact: you do not need to insert spaces or wrap individual letters in elements.

normal, zero, and lengths

normal is the initial value and adds no tracking. A length sets how much to add or remove. An explicit zero adds no space either; it does not remove the font’s kerning.

The same text with four settings

letter-spacing: normal

Read between the lines

letter-spacing: 0

Read between the lines

letter-spacing: -0.025em

Read between the lines

letter-spacing: 0.08em

Read between the lines

normal and 0 usually look alike in this unjustified text. −0.025em brings letters closer and 0.08em spreads them out. Look for changes in line breaks too.
The same text with four settings
<div class="letter-spacing-guide-values">
  <div>
    <p class="label">letter-spacing: normal</p>
    <p class="sample tracking-0">Read between the lines</p>
  </div>
  <div>
    <p class="label">letter-spacing: 0</p>
    <p class="sample tracking-1">Read between the lines</p>
  </div>
  <div>
    <p class="label">letter-spacing: -0.025em</p>
    <p class="sample tracking-2">Read between the lines</p>
  </div>
  <div>
    <p class="label">letter-spacing: 0.08em</p>
    <p class="sample tracking-3">Read between the lines</p>
  </div>
</div>
.letter-spacing-guide-values {
  display: grid;
  gap: 1rem;
  overflow-wrap: anywhere;

  .label {
    margin-block: 0 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: normal;
  }

  .sample {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.6;
  }

  .tracking-0 {
    letter-spacing: normal;
  }

  .tracking-1 {
    letter-spacing: 0;
  }

  .tracking-2 {
    letter-spacing: -0.025em;
  }

  .tracking-3 {
    letter-spacing: 0.08em;
  }
}

Start with normal and compare small changes at the actual reading size. The negative value is a test, not a universal recommendation: check accents, punctuation, and whole words in the font actually used.

Units and inheritance

em uses the font size of the element declaring the length; rem uses the root size, and px sets a CSS length. The property inherits: an already computed em length passes to the descendant as a length, rather than a new proportion.

Resizing text does not recalculate an inherited em

0.08em on the parent; the descendant inherits

Read between the lines
Read between the lines

0.08em on the parent and declared again on the descendant

Read between the lines
Read between the lines

With a 16 px root, the 1.25rem parent adds 1.6 px. The 1.75rem text keeps that 1.6 px when inheriting; declaring its own 0.08em adds 2.24 px.
Resizing text does not recalculate an inherited em
<div class="letter-spacing-guide-units">
  <div>
    <p class="label">0.08em on the parent; the descendant inherits</p>
    <p class="sample">Read between the lines<br><span class="larger">Read between the lines</span></p>
  </div>
  <div>
    <p class="label">0.08em on the parent and declared again on the descendant</p>
    <p class="sample">Read between the lines<br><span class="larger own-tracking">Read between the lines</span></p>
  </div>
</div>
.letter-spacing-guide-units {
  display: grid;
  gap: 1rem;
  overflow-wrap: anywhere;

  .label {
    margin-block: 0 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: normal;
  }

  .sample {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.6;
  }

  .sample {
    letter-spacing: 0.08em;
  }

  .larger {
    font-size: 1.75rem;
  }

  .own-tracking {
    letter-spacing: 0.08em;
  }
}

Use em to tie the adjustment to the local size and declare it wherever it should be recalculated. With rem, the adjustment follows the root even if the local size changes. No unit guarantees legibility on its own.

Tracking across writing systems

Scope an adjustment to text you have reviewed. In connected scripts such as Arabic, separating letters can break their joins; the engine may suppress spacing or handle it differently. Do not automatically transfer Latin tracking to other writing systems.

A local decision in multilingual text

Latin text · 0.08em

Read between the lines

Arabic · normal and RTL direction

مرحبا بالعالم

Japanese · normal

読みやすい文字

Only the Latin sample receives tracking. The Arabic sample keeps lang="ar", dir="rtl", and normal; the Japanese sample keeps lang="ja" and normal. No spaces or elongation characters are inserted.
A local decision in multilingual text
<div class="letter-spacing-guide-scripts">
  <div>
    <p class="label">Latin text · 0.08em</p>
    <p class="sample latin" lang="en">Read between the lines</p>
  </div>
  <div>
    <p class="label">Arabic · normal and RTL direction</p>
    <p class="sample" lang="ar" dir="rtl">مرحبا بالعالم</p>
  </div>
  <div>
    <p class="label">Japanese · normal</p>
    <p class="sample" lang="ja">読みやすい文字</p>
  </div>
</div>
.letter-spacing-guide-scripts {
  display: grid;
  gap: 1rem;
  overflow-wrap: anywhere;

  .label {
    margin-block: 0 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: normal;
  }

  .sample {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.6;
  }

  .sample {
    letter-spacing: normal;
  }

  .latin {
    letter-spacing: 0.08em;
  }
}

normal is this recipe’s starting point, not a ban on tracking all Japanese text. For CJK, Indic scripts, or text with combining marks, review language conventions, the font, and native rendering with readers of that writing system.

Common pitfalls

Tightening text until it fits

Expected result
Words and punctuation remain easy to distinguish.
Cause
Very negative tracking overlaps strokes; very positive tracking fragments words.
Solution
Review the available width, allow reflow, and compare a smaller adjustment. Do not force a single line at the expense of reading.

The same tracking reaches every language

Expected result
Each writing system keeps its shapes and connections.
Cause
The property was set on a broad container and inherited by other text.
Solution
Target the specific text and keep normal wherever you have not validated it. Set lang and dir where appropriate.

Enlarged text gets clipped

Expected result
Content stays available when users change text spacing.
Cause
A fixed height, nowrap, or overflow clipping prevents text from growing.
Solution
Let the block grow and test reflow. WCAG 1.4.12 requires tolerating 0.12em tracking alongside the criterion’s other adjustments without losing content or functionality; it does not require that as the initial style.

Support and compatibility

normal and lengths are Baseline Widely Available. CSS Text Level 4 percentages have more recent support: BCD lists Chrome 145, Firefox 133, and Safari 17.4 as the first versions. The percentage uses the element’s font size, not its container’s width.

A length before the percentage

Base · 0.08em

Read between the lines

Progressive enhancement · 8% if accepted

Read between the lines

At the same size, 8% and 0.08em request the same spacing. The second sample keeps 0.08em if the browser rejects percentages. Both can therefore look alike with or without support.
A length before the percentage
<div class="letter-spacing-guide-percentage">
  <div>
    <p class="label">Base · 0.08em</p>
    <p class="sample">Read between the lines</p>
  </div>
  <div>
    <p class="label">Progressive enhancement · 8% if accepted</p>
    <p class="sample progressive">Read between the lines</p>
  </div>
</div>
.letter-spacing-guide-percentage {
  display: grid;
  gap: 1rem;
  overflow-wrap: anywhere;

  .label {
    margin-block: 0 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: normal;
  }

  .sample {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.6;
  }

  .sample {
    letter-spacing: 0.08em;
  }

  .progressive {
    @supports (letter-spacing: 8%) {
      letter-spacing: 8%;
    }
  }
}

The playground already offers percentages. Accepting syntax with @supports does not certify rendering for every writing system or ensure legibility. An unchanged preview does not prove missing support either: compare the applied CSS and the font actually used.