Text & writing
Spaces, Tabs, and Non-Breaking Spaces Explained
Several different characters can produce blank space in text, and they behave differently. Knowing which one you have explains why text wraps where it does, why columns do not line up, and why some “spaces” are not removed by a simple find and replace.
Ready to try the tool this guide describes?
The main space characters
| Character | Code point | What it does |
|---|---|---|
| Space | U+0020 | The ordinary space between words; a line can wrap here. |
| Tab | U+0009 | Moves to the next tab stop, so its width varies. |
| Non-breaking space | U+00A0 | Looks like a space but keeps the words on either side on the same line. |
| Narrow no-break space | U+202F | A thinner non-breaking space used in some typographic conventions. |
| En space and em space | U+2002, U+2003 | Fixed-width spaces as wide as an en or an em. |
| Zero-width space | U+200B | Takes up no width; marks a possible line-break point. |
Non-breaking spaces
A non-breaking space prevents a line break between two words, which keeps things like “10 kg” or “Mr. Smith” together. In HTML it is written . Because it is a different character from an ordinary space, a find-and-replace for spaces will not change it, and text that contains it may not match text that uses normal spaces.
Tabs
A tab jumps to the next tab stop, so its visible width depends on the program and its settings. Text aligned with tabs in one program can be misaligned in another. For real alignment, use a table instead.
Seeing what you have
Most word processors and code editors can show whitespace characters, usually as dots, arrows, and degree-like symbols for non-breaking spaces. Turning this on is the quickest way to understand spacing problems in a document.
Spaces, Tabs, and Non-Breaking Spaces FAQ
- What is a non-breaking space?
- A space character (U+00A0) that prevents a line break between the words on either side of it.
- Why doesn’t find-and-replace remove some spaces?
- They are probably non-breaking spaces or other space characters, which are different from the ordinary space you searched for.
- Is a tab the same as several spaces?
- No. A tab is one character that moves to the next tab stop, so its width depends on the program.
- What is a zero-width space?
- A character (U+200B) that takes up no width and marks where a line may break. It is invisible, which can make text that looks identical compare as different.
- How do I write a non-breaking space in HTML?
- With the entity .
Related guides
- Why Text Gets Extra SpacesThe usual causes of extra spaces — typing habits, justified PDF text, alignment with spaces, and non-breaking spaces from web pages — and why they matter.
- One or Two Spaces After a PeriodWhere the two-space habit came from, what APA and Chicago recommend today, and why one space is now the norm in published text.
Open the tool
Jump into Remove Extra Spaces when you are ready to process your files.
