No-Break Space (NBSP)

Copy and paste No-Break Space (NBSP) with Unicode, HTML, CSS, HEX, and other shortcodes.

Note: This is an invisible non-breaking space - displayed with a border for visibility

Shortcodes

Copy and paste shortcodes for โ € Braille Pattern Blank.

Symbol โ €
Unicode U+00A0
Alt Code 0160
HTML Code  
HEX Code  
CSS Code \00A0
UTF-8 0xC2 0xA0
UTF-16 0x00A0
UTF-32 0x000000A0

Character Details

Name: No-Break Space (NBSP)

Alternative Names: Non-Breaking Space

Block: Latin-1 Supplement (U+0080 - U+00FF)

Plane: Basic Multilingual Plane (BMP)

Script: Common

Category: Space Separator (Zs)

Character Mirrored: No

Is Whitespace: No (technically)

About No-Break Space (NBSP)

The No-Break Space (NBSP), also known as Non-Breaking Space, is a special space character that prevents an automatic line break at its position. It looks exactly like a regular space but has a crucial difference: text on either side of a non-breaking space will stay together on the same line, even when wrapping occurs.

In HTML and web design, NBSP is one of the most commonly used special characters. It's represented by the HTML entity   and is essential for proper text formatting and layout control.

Key Purpose: NBSP prevents line breaks between words or characters that should stay together, such as "Dr. Smith", "10 kg", or "Chapter 5". It ensures these elements remain on the same line for better readability and professional formatting.

How It Works:

Unlike a regular space (U+0020), which allows text to wrap to the next line, a non-breaking space "glues" the words or characters on either side together. This is particularly important in typography and web design where certain elements must remain united for clarity or aesthetic reasons.

Common Uses:

  • Names with Titles: Dr. Smith, Mr. Jones, Ms. Williams
  • Units of Measurement: 10 kg, 50 mph, 25 ยฐC
  • Dates and Times: January 1, 2025 at 3:00 PM
  • Numbers with Abbreviations: Chapter 5, Page 42, Volume 3
  • Initials: J. K. Rowling, C. S. Lewis
  • Preventing Orphans: Keep the last word of a paragraph with preceding text
  • Phone Numbers: (555) 123-4567
  • Mathematical Expressions: x = 5
  • Multiple Spaces in HTML: Creating indentation (though CSS is preferred)

Web Development Applications:

  • Preventing awkward line breaks in UI elements
  • Maintaining proper spacing in layouts
  • Keeping related text elements together
  • Creating multiple consecutive spaces (HTML normally collapses multiple spaces)
  • Forcing specific text to stay on one line

Regular Space vs. Non-Breaking Space:

Feature Regular Space (U+0020) No-Break Space (U+00A0)
Allows Line Break Yes No
Visual Width Same as NBSP Same as regular space
HTML Collapse Multiple spaces โ†’ 1 space Each NBSP preserved
Use Case Normal word separation Keep words together

Important Note: While NBSP is useful, overusing it can create awkward text flow and make content harder to read. Use it strategically only where line breaks would genuinely cause confusion or poor formatting.

How to type No-Break Space?

To type the using the keyboard you can use the Alt code from the shortcode section. Here are the simple steps to type the using Alt code from your keyboard. Make sure you switch on the Num Lock from the keyboard and you type the number from the Numpad and not from the top row of the keyboard.

  • Hold down the left Alt Key from your keyboard.
  • Type the Alt code number 0160 and release the Alt key.

Once you release the Alt key, the symbol will be displayed.

Alternative Methods:

  • Windows: Alt + 0160 (on numpad) or Alt + 255
  • Mac: Option + Space (โŒฅ + Space)
  • Linux: Ctrl + Shift + U, then type 00A0 and press Enter
  • HTML: Type   in your code
  • Copy & Paste: Simply click the copy button above (easiest method!)

Mac Users Tip: On Mac, accidentally pressing Option while typing a space is a common way to insert NBSP. This can cause issues in code editors like Xcode, which may show warnings about non-breaking spaces in your code.

How to add No-Break Space in HTML?

To add the No-Break Space in HTML, you can use an HTML entity, an HTML code (decimal), and a Hex code. The HTML entity   is the most commonly used method. Here are the examples:

// HTML entity example (Most common)

<p>Dr.&nbsp;Smith visited at 3:00&nbsp;PM</p>

// HTML code example (Decimal)

<p>Dr. Smith visited at 3:00 PM</p>

// HEX code example

<p>Dr. Smith visited at 3:00 PM</p>

All the above examples will display the No-Break Space and keep "Dr." and "Smith" together, as well as "3:00" and "PM".

Output: Dr. Smith visited at 3:00 PM

(Text will not break between Dr./Smith or 3:00/PM)

How to add No-Break Space in CSS?

To display the No-Break Space from CSS, you can use a CSS escape code. You can add content :before or :after an element. Here is the example:

// CSS code example

.nbsp-after:after {
  content: '\00A0';
}

/* Multiple non-breaking spaces */
.triple-nbsp:after {
  content: '\00A0\00A0\00A0';
}

// The HTML

<span class="nbsp-after">Dr.</span>Smith
<span class="triple-nbsp">Text</span>Indented

The above CSS will add non-breaking spaces after the elements.

Copied!

Copy Manager

chars
Auto-captures site copies