CSS Word Spacing Generator
Create and customize word-spacing for typography. Adjust the space between words to improve readability and create typographic effects.
Presets
Configuration
Tight (-0.5em)Normal (0)Wide (1em)
em
Live Preview
18px
1.6
The quick brown fox jumps over the lazy dog and runs through the forest.
Justified Text Preview
The quick brown fox jumps over the lazy dog and runs through the forest.
Spacing Comparison
Tight
-0.1em
Quick brown fox jumps
Normal
normal
Quick brown fox jumps
Loose
0.1em
Quick brown fox jumps
Wide
0.2em
Quick brown fox jumps
Current
0em
Quick brown fox jumps
Generated CSS
.text {
word-spacing: 0em;
}Full Example
View comprehensive word-spacing examples
/* =================================
CSS Word Spacing Examples
================================= */
/* Basic word-spacing values */
.normal-spacing {
word-spacing: normal;
}
.tight-spacing {
word-spacing: -0.1em;
}
.loose-spacing {
word-spacing: 0.2em;
}
/* Heading styles with word-spacing */
h1 {
font-size: 3rem;
font-weight: 700;
word-spacing: 0.1em;
letter-spacing: -0.02em;
}
h2 {
font-size: 2rem;
font-weight: 600;
word-spacing: 0.05em;
}
/* Body text adjustments */
.body-text {
word-spacing: normal;
line-height: 1.7;
}
.article-body {
word-spacing: 0.02em;
line-height: 1.8;
text-align: justify;
}
/* Justified text needs extra word-spacing */
.justified-text {
text-align: justify;
word-spacing: 0.05em;
hyphens: auto;
}
/* Condensed text for tight layouts */
.condensed-text {
word-spacing: -0.1em;
letter-spacing: -0.02em;
}
/* Wide heading for dramatic effect */
.wide-heading {
word-spacing: 0.3em;
text-transform: uppercase;
letter-spacing: 0.1em;
}
/* Navigation links */
.nav-link {
word-spacing: 0.05em;
text-transform: uppercase;
font-size: 0.875rem;
}
/* Button text */
.button {
word-spacing: 0.05em;
text-transform: uppercase;
font-weight: 600;
}
/* Blockquote styling */
blockquote {
word-spacing: 0.1em;
font-style: italic;
line-height: 1.8;
}
blockquote cite {
word-spacing: normal;
font-style: normal;
}
/* Caption and small text */
.caption {
font-size: 0.875rem;
word-spacing: 0.02em;
color: #6b7280;
}
.small-print {
font-size: 0.75rem;
word-spacing: 0.01em;
}
/* Hero section text */
.hero-title {
font-size: 4rem;
font-weight: 800;
word-spacing: 0.15em;
line-height: 1.1;
}
.hero-subtitle {
font-size: 1.5rem;
word-spacing: 0.1em;
line-height: 1.5;
}
/* Card components */
.card-title {
font-weight: 600;
word-spacing: 0.05em;
}
.card-description {
word-spacing: normal;
line-height: 1.6;
}
/* Code and monospace */
pre, code {
font-family: 'Fira Code', monospace;
word-spacing: normal;
}
/* Logo text */
.logo-text {
word-spacing: 0.2em;
text-transform: uppercase;
font-weight: 700;
}
/* Tagline */
.tagline {
word-spacing: 0.1em;
font-style: italic;
font-size: 1.125rem;
}
/* Lists */
ul li, ol li {
word-spacing: normal;
line-height: 1.6;
}
/* Table cells */
table td, table th {
word-spacing: normal;
}
/* Form labels */
label {
word-spacing: 0.02em;
font-weight: 500;
}
/* Error and success messages */
.message {
word-spacing: 0.02em;
font-size: 0.875rem;
}
/* Responsive word-spacing */
@media (max-width: 768px) {
h1 {
word-spacing: 0.05em;
}
.hero-title {
word-spacing: 0.1em;
}
.justified-text {
text-align: left;
word-spacing: normal;
}
}
/* Print styles */
@media print {
body {
word-spacing: normal;
}
.justified-text {
word-spacing: 0;
text-align: left;
}
}
/* CSS Custom Properties for theming */
:root {
--word-spacing-tight: -0.1em;
--word-spacing-normal: 0;
--word-spacing-loose: 0.1em;
--word-spacing-wide: 0.2em;
--word-spacing-widest: 0.5em;
}
.use-word-spacing-tight {
word-spacing: var(--word-spacing-tight);
}
.use-word-spacing-loose {
word-spacing: var(--word-spacing-loose);
}
.use-word-spacing-wide {
word-spacing: var(--word-spacing-wide);
}
/* Combined with letter-spacing */
.typographic-heading {
word-spacing: 0.1em;
letter-spacing: 0.05em;
text-transform: uppercase;
}
/* Animated word-spacing (use sparingly) */
.hover-expand-words {
word-spacing: normal;
transition: word-spacing 0.3s ease;
}
.hover-expand-words:hover {
word-spacing: 0.2em;
}
/* Language-specific adjustments */
:lang(de) {
/* German has long compound words */
word-spacing: 0.05em;
}
:lang(ja), :lang(zh) {
/* CJK languages don't use word-spacing */
word-spacing: normal;
}
/* Multi-column text */
.multi-column {
column-count: 2;
column-gap: 2rem;
word-spacing: 0.02em;
text-align: justify;
}
/* Pull quotes */
.pull-quote {
font-size: 1.5rem;
font-weight: 500;
word-spacing: 0.1em;
line-height: 1.5;
border-left: 4px solid #8b5cf6;
padding-left: 1rem;
}
/* Footer text */
.footer-text {
font-size: 0.875rem;
word-spacing: 0.01em;
}
.footer-links {
word-spacing: 0.05em;
}
/* Testimonials */
.testimonial {
word-spacing: 0.05em;
font-style: italic;
line-height: 1.8;
}
.testimonial-author {
word-spacing: normal;
font-style: normal;
font-weight: 600;
}
/* Call to action */
.cta-text {
word-spacing: 0.1em;
font-size: 1.25rem;
font-weight: 600;
}Reference
Word Spacing Values
| Value | Description |
|---|---|
normal | Default spacing defined by the font (usually the width of a space character) |
<length> | Additional spacing added to the default word spacing (can be negative) |
Common Units
| Unit | Description | Use Case |
|---|---|---|
em | Relative to font-size | Best for scalable, proportional spacing |
rem | Relative to root font-size | Consistent spacing across components |
px | Absolute pixels | Precise, fixed spacing |
ch | Width of "0" character | Character-based spacing |
Browser Support
word-spacing is supported in all browsers:
- Chrome 1+
- Firefox 1+
- Safari 1+
- Edge 12+
- IE 6+
Word Spacing vs Letter Spacing
| Property | Affects | Best For |
|---|---|---|
word-spacing | Space between words | Justified text, headlines, readability |
letter-spacing | Space between characters | Uppercase text, logos, tracking |
Best Practices
- Use em units for word-spacing so it scales with font-size
- Justified text often benefits from slightly increased word-spacing (0.02em to 0.05em)
- Headlines can use wider word-spacing for dramatic effect (0.1em to 0.3em)
- Body text usually works best with normal word-spacing
- Condensed layouts can use negative word-spacing (-0.05em to -0.1em)
- Test across fonts - Different fonts have different inherent word spacing
- Combine with letter-spacing for complete typographic control
- Consider line length - Wider word-spacing affects optimal line length
Typography Guidelines
| Element | Recommended Spacing |
|---|---|
| Body text | normal to 0.02em |
| Justified text | 0.02em to 0.05em |
| Headlines | 0.05em to 0.2em |
| Logo/Brand text | 0.1em to 0.3em |
| Condensed text | -0.05em to -0.15em |
| Blockquotes | 0.05em to 0.1em |