How it works
The non breaking space is U+00A0 in Unicode, in HTML, NBSP for short. It looks like an ordinary space, but a line of text never breaks at it. Its Alt code is 0160, or 255.
Read the full guide
What a non-breaking space does
Software may break a line wherever an ordinary space falls. A non-breaking space, also written nonbreaking space, stops that: between 100 and km it keeps the two together, and if they do not fit they move to the next line as one. A web page also collapses a run of ordinary spaces into one; non-breaking spaces do not collapse.
The other Unicode spaces
An em space is as wide as the type size, and an en space is half of that. A thin space is typically a fifth or a sixth of an em, and a hair space is thinner still. A figure space is as wide as a digit.
- The narrow no-break space, U+202F, is as narrow as a thin space and does not break.
- ␣ and ⍽ are visible signs that show where a space is; they are not spaces.
- The zero width space, U+200B, takes no room at all and is for line break control.
Questions and answers
What is the Alt code for a non breaking space?
Alt+0160 on the number pad, or Alt+255. The first is its place in code page 1252, the second its place in code page 437, and both type U+00A0. The ordinary space is Alt+32. The em, en, thin and hair spaces are in neither code page.
What is the Unicode character for a space?
U+0020 is the ordinary space. The non-breaking space is U+00A0, the en space U+2002, the em space U+2003, the thin space U+2009 and the hair space U+200A. Unicode defines twenty-five whitespace characters in all.
Is whitespace a special character?
A whitespace character is a character like any other: it has a code point and can be copied. What is special is that nothing is drawn. Among the HTML special characters, ,  ,   and   name four of them.
What is the non breaking space symbol?
The character itself shows nothing. Where a visible symbol is needed, ⍽ is the sign for a non-breaking space and ␣ the sign for an ordinary one.
Can I copy and paste a whitespace character?
Yes. Each blank row holds one real character, although nothing of it can be seen. Pasted into text it behaves as that space does: the hair space stays hair thin, and the non-breaking one holds its words together.