Skip to content

No-Break Space U+00A0

U+00A0 ·   · 2 bytes in UTF-8

The Complete Guide to No-Break Space (U+00A0): Mechanics, Tables, and Validation Shortcuts

Copy the real U+00A0, see how 8 common languages and tools treat it, and glue numbers to their units automatically.

Page 16 · U+00A0 Copy Box

No-Break Space (U+00A0) Copy Box

Copying a web page by hand often turns U+00A0 into a plain space. These buttons write the exact character or code to your clipboard.

How many


1

Same character, other formats

Keyboard shortcuts for typing it yourself
  • Alt + 0160 on the number pad · Windows
  • Option + Space · macOS
  • Ctrl + Shift + Space · Microsoft Word
  • =CHAR(160) · Excel and Google Sheets

How to Use No-Break Space Strings for Platform Layout Cleanups

0 of 4 done

  1. Copy the character. Press “Copy U+00A0 Character”. The green message under the button confirms what reached your clipboard: one character, 2 bytes.
  2. Pick the format your target reads. HTML wants  , CSS content wants 0A0, JavaScript and JSON want  , URLs want %C2%A0. Word processors and chat apps take the raw character.
  3. Test before you ship. Paste the string into the compatibility tester. If the row for your back end says “Removed”, that space disappears the moment the form is saved.
  4. Fix whole paragraphs at once. Run finished copy through the no-break fixer. It glues numbers to units, currency to amounts and titles to names, and counts every change.

The classic case is a product card 300 pixels wide. “Total: 1,250” fits on the first line and “USD” drops alone onto the second. One U+00A0 between the number and the currency fixes it at every screen width, with no media query and no extra CSS.

Where it does not help is blank usernames. U+00A0 is a space separator, so JavaScript’s trim() and Python’s strip() both remove it, and a name made only of no-break spaces arrives at the server empty. For that job the Hangul Filler U+3164 Code page is the right tool, because U+3164 counts as a letter.

Technical Breakdown: U+00A0 vs. Standard Whitespace Vectors

The no-break space is a normal-width space that never lets a line wrap at its position and never collapses into its neighbours. It sits at code point 160, inside the Latin-1 Supplement block, so it has existed since the earliest 8-bit character sets and every font you are likely to meet can draw it.

In UTF-8 it takes 2 bytes, C2 A0. That detail explains a bug most developers see at least once: a stray “” in front of spaces. The page was saved as UTF-8 but read as Windows-1252, so the C2 byte shows up as “” and the A0 byte as the space after it.

Browsers treat U+00A0 differently from the space bar in two ways. First, it never collapses: 5 no-break spaces render as 5 gaps, while 5 ordinary spaces render as 1 under the default white-space: normal. Second, Unicode gives it the line-break class GL (“glue”), which forbids a break before or after it. Its width matches the font’s ordinary space in nearly every typeface.

Character Hex code Database byte size Validation bypass Text wrap prevention Collapses in HTML
Space bar space U+0020 1 byte UTF-8 · 2 bytes UTF-16 No. Every trim function removes it No. It is the normal break point Yes, runs become 1 space
No-Break Space U+00A0 2 bytes UTF-8 · 2 bytes UTF-16 Partial. Survives PHP, Java, MySQL and Excel trims; removed by JavaScript and Python Yes. No break before or after No
Hangul Filler U+3164 3 bytes UTF-8 · 2 bytes UTF-16 Yes. It is a letter, so no trim removes it Not designed for it No
Zero Width Space U+200B 3 bytes UTF-8 · 2 bytes UTF-16 Weak. Not trimmed, but many apps strip it on purpose No. It does the opposite and adds a break point No

Read the table by job. Only U+00A0 stops a wrap. Only U+3164 reliably passes an “is this field empty?” check. The zero width space is the one to use when you want a long URL to break, never when you want it to stay whole. The full list of 12 spaces, with real widths, is on the space copy and paste page, and the HTML spellings for each one are in the html space characters table.

Advanced Validation & Line Break Protection Mechanics

How validation scripts actually treat U+00A0

The same character gets three different treatments depending on which language touches it first. That is why a sign-up form can accept a name in the browser and reject it on the server, or the reverse.

  • JavaScript: trim() removes it and the regex s matches it.
  • Python 3: str.strip() removes it and str.split() splits on it.
  • PHP: trim() keeps it, because its default list holds only 6 ASCII characters.
  • Java: both trim() and strip() keep it; Character.isWhitespace() deliberately returns false for no-break spaces.
  • MySQL: TRIM() removes only plain spaces by default.
  • Excel and Google Sheets: TRIM() ignores CHAR(160). Use =TRIM(SUBSTITUTE(A1, CHAR(160), " ")) instead.

The practical risk is duplicate data. “Sara Khan” typed by hand and “Sara Khan” pasted from a PDF can look identical and still fail an equality check, so a search for one never finds the other. The fix is to normalise on input: replace / /g with a plain space, or apply Unicode NFKC normalisation, which maps U+00A0 to U+0020 for you.

Preventing awkward line breaks in web design

U+00A0 is the right tool for short pairs that read wrong when split across lines:

  • a number and its unit: 10 kg, 5 %
  • a currency and its amount: Rs 2,500
  • a title and a name: Dr. Khan
  • a day and a month: 12 March
  • the last two words of a heading, so no word sits alone on the final line

For anything longer than 2 or 3 words, wrap the phrase in a span with white-space: nowrap instead; a phone number is the usual example. And never build indents or gaps between boxes out of rows of  . They do not shrink when the screen does, which breaks the reflow test in WCAG 1.4.10 at 320 CSS pixels. Spacing between elements belongs in padding, margin or gap.

How screen readers handle hidden non-breaking blocks

In normal reading, NVDA, JAWS and VoiceOver treat U+00A0 like an ordinary word gap. Nothing is announced, so “10 kg” is read exactly like “10 kg”. When a user steps through text one character at a time, some readers say “space” at that position.

Trouble starts when no-break spaces replace structure. An empty paragraph holding only  , often used as a vertical spacer, can be announced as “blank” and adds a pointless stop for keyboard and screen-reader users. Use CSS margins for vertical space and keep U+00A0 for joining words.

Frequently Asked Questions (FAQ) regarding U+00A0 Script Formatting

Are  ,   and   different characters?

No. They are three spellings of the same U+00A0: the named entity, the decimal reference and the hex reference. All three render as one character and count as 1 toward any length limit once the page is parsed.

Can I use U+00A0 to make a blank username or comment?

Usually not. Apps that trim input in JavaScript or Python remove it, so the field arrives empty and the save button stays grey. A letter-class blank works instead; the blank comment copy and paste and free fire name space copy tools both use U+3164 for that reason.

How do I find and remove stray no-break spaces in pasted text?

Paste the text into the invisible character detector, which marks every U+00A0 in place. To swap them all for normal spaces in one pass, use remove invisible characters; in code, text.replace(/ /g, ' ') does the same job.

Is the narrow no-break space U+202F the same thing?

No. U+202F is also unbreakable but about half as wide, and French typography uses it before “!”, “?” and “:”. It matters to developers because recent versions of the ICU date library put U+202F before “AM” and “PM”, so toLocaleTimeString() output from 2023 onward can fail comparisons that expect U+0020 or U+00A0.

The single most useful takeaway for U+00A0

Use the no-break space to keep 2 short things together on one line, and normalise it away when you store or compare text. It is a layout character, not a blank-name trick; for invisible names, the blank text generator uses a character that counts as a letter.

Need it right now? The big button at the top copies one U+00A0, and the fixer glues a whole paragraph in one paste.



Copy U+00A0