A regular space and a non-breaking space can look almost identical on screen. Both create a blank gap between visible characters, but they are not the same Unicode character.
An ordinary space is U+0020 SPACE. A non-breaking space is U+00A0 NO-BREAK SPACE (NBSP). The practical difference is line breaking: an ordinary space normally allows a line break, while NBSP normally keeps the surrounding text together.
Regular Space and Non-Breaking Space at a Glance
| Code point | Unicode name | Typical line-breaking behavior |
|---|---|---|
| U+0020 | SPACE | Normal word space and break opportunity |
| U+00A0 | NO-BREAK SPACE | Space with no ordinary line break at that position |
The two are part of the wider family of invisible and special space characters, where characters that look blank can still have different encoded meanings and layout behavior.
What Is a Regular Space?
U+0020 SPACE is the ordinary word space used throughout basic text. Pressing the space bar in a typical text field normally inserts this character.
It separates words and usually gives the layout engine a place where a line can wrap. If a phrase reaches the end of a line, text on either side of an ordinary space can normally be split across lines.
What Is a Non-Breaking Space?
U+00A0 NO-BREAK SPACE also creates space between surrounding characters, but it indicates that a normal line break should not occur there.
This is useful when two pieces of text should remain together visually. The specific cases depend on language and style rules, so NBSP should be treated as a layout behavior rather than a universal formatting recipe.
Why Can U+0020 and U+00A0 Look the Same?
Unicode defines NO-BREAK SPACE as the no-break counterpart of the ordinary space and specifies that it has the same width as U+0020 under normal circumstances.
That means visual inspection is unreliable. Two phrases can appear identical even though one contains U+0020 and the other contains U+00A0.
How Can You Tell Which Space Is Present?
Inspect the code point rather than the width of the gap:
- U+0020 — SPACE
- U+00A0 — NO-BREAK SPACE
An editor that can reveal whitespace or a Unicode code-point inspector can expose the difference immediately.
What Does Mean in HTML?
HTML defines the named character reference for U+00A0 NO-BREAK SPACE.
It does not mean “insert several spaces”. It represents one specific Unicode character. After HTML is parsed, the text contains U+00A0 itself, which is why copying that text can preserve the no-break space.
Why Does NBSP Sometimes Appear After Copy and Paste?
If a webpage or formatted document contains U+00A0, copying the text can preserve it. The pasted result may look as though it contains a regular space even when the underlying code point is different.
This is one of the most common examples of why copied text can contain invisible characters.
How Can NBSP Cause Search or Matching Problems?
Suppose one string contains Hello + U+0020 + World and another contains Hello + U+00A0 + World. The visible phrase may look the same, but the strings do not contain the same sequence of code points.
Depending on the software, that can affect exact search, find and replace, spreadsheet lookups, database comparisons, and imported data. Why Invisible Unicode Characters Can Break Search and String Matching explains why visually identical text can still compare differently.
NBSP Can Also Explain Text That Refuses to Wrap
A visible clue is line wrapping. If two words refuse to separate at the end of a line even though there appears to be a normal space between them, the blank character may be U+00A0.
Replacing it with U+0020 restores an ordinary break opportunity—but only do that if the original no-break behavior was not intentional.
Non-Breaking Space vs Word Joiner
U+00A0 is not the only Unicode character that can prevent a line break. U+2060 WORD JOINER also inhibits breaking between surrounding text, but it has no width.
| Code point | Name | Width | General role |
|---|---|---|---|
| U+00A0 | NO-BREAK SPACE | Space width | Adds spacing while normally preventing a break |
| U+2060 | WORD JOINER | Zero width | Prevents a break without adding visible space |
They solve related line-breaking problems but are not interchangeable.
Non-Breaking Space vs Narrow No-Break Space
Unicode also includes U+202F NARROW NO-BREAK SPACE. Like NBSP, it has non-breaking behavior, but it is intended to be narrower and is used in particular typographic conventions.
The exact visual width can still depend on the font and rendering environment, so code-point inspection remains the reliable way to tell the characters apart.
Is a Non-Breaking Space the Same as Multiple Spaces?
No. One U+00A0 is one character. Its defining feature is not “more blank width”; it is a space with non-breaking behavior.
On the web, repeated NBSP characters should not be treated as a general-purpose layout system. CSS or another layout mechanism is usually more appropriate when the goal is visual positioning rather than meaningful text spacing.
Should You Replace Every NBSP With a Regular Space?
No. Some NBSP characters are accidental artifacts in copied data, while others were inserted deliberately to keep related text on the same line.
If you are cleaning machine-oriented data and no-break typography has no meaning, a domain-specific replacement rule may be appropriate. If you are editing prose or formatted content, replacing every NBSP can introduce awkward line breaks.
How to Diagnose a Suspicious Space
- Inspect the Unicode code point.
- Check whether the character is U+0020, U+00A0, U+202F, or another space.
- Observe whether the issue is wrapping, matching, or both.
- Replace the character only if its current behavior is not wanted.
The Main Difference
U+0020 SPACE is the ordinary word space and normally allows a line-break opportunity. U+00A0 NO-BREAK SPACE provides visible spacing while normally preventing a break at that position.
When a space looks ordinary but wrapping or matching behaves strangely, checking the code point is usually faster than judging the character by appearance.