Space Characters: Regular vs NBSP vs Thin vs Zero-Width
Encoding Comparison
| Format | | |||
|---|---|---|---|---|
| Code Point | ||||
| HTML Entity |   |   |   | ​ |
| CSS | ||||
| UTF-8 Hex |
What's the Difference?
The regular space (U+0020) is the standard word separator that also serves as a line-break opportunity for text wrapping, while the no-break space (U+00A0) looks identical but prevents a line break between the surrounding words — essential for keeping units with their values (e.g., 100 km) or proper names on the same line. The thin space (U+2009) is approximately one-fifth the width of a regular space and is used in professional typography to add subtle spacing between certain punctuation marks and their surrounding text, such as the French guillemet convention or around em dashes. The zero-width space (U+200B) has no visual width at all but acts as a line-break opportunity, useful for hinting wrap points in long URLs or words in languages that do not use spaces between words. These invisible characters are a common source of hard-to-debug problems: text that looks identical visually may fail string comparisons, cause unexpected line breaks, or break URL parsing if the wrong space character is used. Always inspect pasted text in a Unicode-aware tool when troubleshooting unexpected behavior; in HTML the no-break space is while thin space is  .