InvisibleIT
Back to generator

Copy, check, and replace NBSP

Non-Breaking Space (U+00A0) Copy & Paste

Copy a Non-Breaking Space (NBSP, U+00A0) in one click. Unlike a regular space, NBSP helps keep words together on the same line. Check your paste, replace unwanted NBSP, or copy the HTML code.

A space that keeps words together

Copy Non-Breaking Space (U+00A0)

Copy a non-breaking space to keep words together when text wraps. If you need HTML code instead, copy  .

[ ]

The non-breaking space is between the brackets. They won't be copied.

Choose the space character for text, or the HTML code for a web page.

Check Your Copied NBSP (U+00A0)

Paste text here to find non-breaking spaces (U+00A0) and see where they appear. You can also spot regular spaces and Narrow No-Break Spaces (U+202F). Your text stays in your browser.

Characters checked

0

NBSP (U+00A0)

0

Result

Waiting for pasted text

Replace NBSP with Regular Spaces

Replace non-breaking spaces with regular spaces without joining words. Or remove them completely. The text you pasted above stays unchanged, and you can select Clear Text to start over.

Converted text

0 NBSP found

Paste text with a non-breaking space above to see the result.

Only U+00A0 is replaced or removed. Regular spaces, Narrow No-Break Spaces (U+202F), Zero Width Spaces (U+200B), and line breaks stay as they are. Your text is processed in your browser.

What Is a Non-Breaking Space (NBSP)?

A Non-Breaking Space (NBSP, U+00A0) looks like a normal space but keeps nearby text from splitting across lines. For example, it can keep Dr. Smith or 100 kg together. Its official Unicode name is NO-BREAK SPACE.

In HTML, the named reference   represents this character. NBSP is not the same as Zero Width Space (U+200B): NBSP occupies space, while U+200B has no visible width and offers a line-break opportunity.

If copied text has unusual spacing, paste it into the checker above to see whether it contains U+00A0 before changing it.

Non-Breaking Space vs Regular Space (U+00A0 vs U+0020)

Both characters can look like the same blank gap. The difference is how they behave when a line needs to wrap. A regular space usually permits a break; NBSP normally prevents one.

PropertyRegular SpaceNBSP
UnicodeU+0020U+00A0
Official nameSPACENO-BREAK SPACE
Adds a visible gapYesYes
Usually allows line wrappingYesNo
HTML sourceSpace character 
Removed by JavaScript trim() at endsYesYes
NFKC normalizationUnchangedBecomes U+0020

If you are checking text in code, look for U+00A0 before using trim() or Unicode normalization. Those steps can change or remove it.

How Does NBSP Prevent Line Breaks?

A no-break space is useful between an abbreviation and a name, or between a number and a unit, where separating the two parts could make the text harder to read. It does not force a new line. A browser may still break elsewhere to fit the available width.

Common Examples of Non-Breaking Spaces

Each example contains a real non-breaking space. The [NBSP] label shows where it is, since it looks almost like a regular space. Spacing conventions vary between languages and writing styles.

Title and name

Dr. Smith

Dr.[NBSP]Smith

Keeps the title and name together when a line wraps.

Number and unit

100 kg

100[NBSP]kg

Keeps the measurement together in layouts that use a space before the unit.

Section reference

Section 4

Section[NBSP]4

Keeps a short label beside its number.

Use a normal space when a line is allowed to break. A non-breaking space can cause text to run past the edge of a narrow box, so avoid inserting one between every word.

See How a Non-Breaking Space Keeps Words Together

Choose a text width below. With a regular space, “Dr.” and “Smith” can appear on different lines. With NBSP, they normally stay together. The rest of the sentence can still wrap.

Example text width

Regular Space (U+0020)

Please contact Dr. Smith today for details.

Non-Breaking Space (U+00A0)

Please contact Dr. Smith today for details.

Both examples contain real space characters. The result may look different depending on your screen, browser, and font.

NBSP in HTML:   and Unicode Codes

In HTML,   represents one non-breaking space (U+00A0). Use Copy HTML   Code when writing HTML. Use Copy Non-Breaking Space above when you want the character itself.

HTML Named

 

HTML Decimal

 

HTML Hex

 

Unicode

U+00A0

JavaScript

\u00A0

Python

\u00A0

UTF-8

C2 A0

URL Encoding

%C2%A0

HTML example: keep a name or unit together

<p>Dr.&nbsp;Smith</p>
<p>100&nbsp;kg</p>

Why Does &nbsp; Show Up as Text?

A browser reads &nbsp; in an HTML page as a non-breaking space. In a message or plain-text field, it usually appears as the written code instead. If that happens, use Copy Non-Breaking Space at the top of this page.

<p>Dr.&nbsp;Smith</p>
<p>Show &amp;nbsp; as visible code.</p>

In the second HTML example, &amp;nbsp; displays the literal text &nbsp;. Neither form should be typed into a plain-text field when you simply need one NBSP character.

NBSP or CSS white-space: nowrap?

Use NBSP to keep two particular words together. If an entire label or button must stay on one line, use CSS instead of inserting special spaces throughout the text.

HTML

<span class="no-wrap">Dr. Smith</span>

CSS

.no-wrap { white-space: nowrap; }

The CSS rule applies to the whole element, while NBSP affects the location where the character appears. See MDN's white-space guide for wrapping behavior.

Find and Replace U+00A0 in JavaScript

Check the original text for U+00A0 before cleaning it. Replace each NBSP with a regular space to keep word separation.

const text = "Dr.\u00A0Smith";
console.log(text.includes("\u00A0")); // true
const cleaned = text.replace(/\u00A0/g, " ");
console.log(cleaned); // Dr. Smith

Find and Replace U+00A0 in Python

text = "Dr.\u00A0Smith"
print("\u00A0" in text)  # True
cleaned = text.replace("\u00A0", " ")
print(cleaned)  # Dr. Smith

The checker above distinguishes U+00A0 from regular spaces and Narrow No-Break Spaces (U+202F). The examples only replace U+00A0. To find other hidden characters, try the Invisible Character Detector.

In HTML, NBSP keeps its space instead of collapsing like ordinary spaces. Avoid using long runs of &nbsp; to control page layout or indentation; use CSS spacing or margins instead. For more about HTML codes, see the MDN character reference guide.

Non-Breaking Space Codes and Details

Here are the codes for U+00A0. If a space looks unusual, check its Unicode value to see whether it is a regular space (U+0020) or a non-breaking space.

Official Unicode nameNO-BREAK SPACE
Common namesNon-Breaking Space, NBSP
Unicode code pointU+00A0
Decimal160
Unicode categoryZs — Space Separator
Line-break behaviorNormally prevents wrapping here (GL — Glue)
UTF-8 bytesC2 A0
HTML named reference&nbsp;
HTML decimal&#160;
HTML hexadecimal&#xA0;
JavaScript / Python code\u00A0
NFKC normalizationMaps to U+0020 (regular space)
JavaScript trim()Removes leading or trailing NBSP

How to Type a Non-Breaking Space on Windows, Mac and Word

Non-Breaking Space in Microsoft Word

In desktop Word for Windows, use Ctrl + Shift + Spacebar. You can also open Insert → Symbol → More Symbols → Special Characters and choose Nonbreaking Space. These are Word-specific instructions, not a universal Windows shortcut.

Non-Breaking Space Alt Code on Windows

In many Windows desktop applications, hold Alt and type 0160 on the numeric keypad. Some keyboards and apps handle Alt codes differently; the Copy NBSP button above is an alternative.

Non-Breaking Space on Mac and Mobile

On some Mac keyboard layouts, Option + Space inserts NBSP, but the shortcut depends on your layout and app. On iPhone, Android, or any device without an NBSP key, copy U+00A0 from the top of this page and paste it where needed.

Microsoft documents the Word shortcut and Special Characters menu in its Keep Text Together guide.

Why Is U+00A0 in My Text?

Copied text has unusual spaces

Web pages, Word documents and emails may contain NBSP to keep words together. When copied, U+00A0 can look identical to an ordinary space. Paste the text into the checker above to identify where it appears.

I want to remove NBSP without joining words

Choose Replace with Regular Space in the converter. It replaces U+00A0 with U+0020 and preserves other characters. Removing NBSP completely can join words, so it is not the default.

My code or text search cannot find the space

U+00A0 and a regular space (U+0020) look alike, but text searches and code may treat them differently. In JavaScript, trim() removes NBSP from the start or end of a string. NFKC normalization changes it into U+0020. Check the original text before applying either step.

The space changes after pasting into another app

Some apps change special spaces when you paste or save text. Check the character here, then try it in the app where you plan to use it. That app may keep, replace, or remove it.

NBSP vs Narrow No-Break Space vs Word Joiner

Characters that look like spaces can affect line breaks in different ways. Check which one you have before changing it. The converter above replaces or removes only U+00A0.

CharacterUnicodeWidthWhat it does
Regular SpaceU+0020Normal space widthText can normally wrap here
Non-Breaking Space (NBSP)U+00A0Like a regular spaceNormally keeps text on both sides together
Narrow No-Break SpaceU+202FNarrower spacingKeeps text together with a narrower space
Word JoinerU+2060No added space widthKeeps text together without adding a gap
Zero Width SpaceU+200BNo added space widthAllows wrapping without adding a visible gap

For non-joining Arabic-script letters, see Zero Width Non-Joiner (U+200C). For other hidden characters, use the Invisible Character Detector.

Frequently Asked Questions

What is a non-breaking space (NBSP)?

A non-breaking space is Unicode U+00A0, officially called NO-BREAK SPACE. It provides spacing but normally prevents a line break at its position.

How do I copy and paste a non-breaking space?

Select Copy Non-Breaking Space at the top of this page. The button copies one actual U+00A0 character without brackets. Paste it into the checker to confirm what you copied.

What does &nbsp; mean in HTML?

In HTML, &nbsp; stands for a non-breaking space (U+00A0). Copy the HTML code when writing HTML, or use the main button to copy the actual space character.

What is the difference between a regular space and NBSP?

A regular space (U+0020) usually lets text wrap. NBSP (U+00A0) looks similar but normally keeps the words on either side together. Unlike Zero Width Space (U+200B), both take up space.

How do I remove non-breaking spaces from text?

Paste your text into Check Your Copied NBSP above, then choose Replace with Regular Space. Words remain separated. If you want to delete the special spaces entirely, choose Remove NBSP Completely.

What is the Alt code for a non-breaking space?

Alt+0160 can enter a non-breaking space in many Windows applications when typed with a numeric keypad. Availability depends on the application and keyboard setup.

How do I insert a non-breaking space in Microsoft Word?

In desktop Word for Windows, press Ctrl+Shift+Spacebar. You can also choose Insert, Symbol, More Symbols, Special Characters, then Nonbreaking Space.

Why does U+00A0 look like a regular space?

A non-breaking space looks almost identical to a regular space, but it affects where text can wrap. Paste your text into the checker above to tell them apart.

Why does &nbsp; appear as text after I paste it?

Browsers turn &nbsp; in HTML into a space character. Most chat messages and plain-text fields show the code as text instead. Use Copy Non-Breaking Space above when you want the actual character.

When should I use CSS white-space: nowrap instead of NBSP?

Use NBSP to keep specific words together, such as Dr. and Smith. Use CSS white-space: nowrap when the entire label or element should stay on one line. For ordinary spacing, use regular spaces or CSS layout.

Does JavaScript trim() remove NBSP?

Yes. JavaScript trim() removes U+00A0 at the beginning or end of a string. Unicode NFKC normalization also maps U+00A0 to U+0020, so detect it in raw text before trimming or normalizing.

Sources and Further Reading

These references explain how non-breaking spaces work in text, HTML, and Microsoft Word.

Related Unicode Tools

Need a different kind of space or want to check other hidden characters? Try these related tools.