How-To

How to Type a Zero-width Space for Perfect Line Breaks in Tables

Frustrated by your lines of text breaking in random places in your Word doc? Here’s the solution.

I’m going to teach you how to type one of my favorite characters. If you’re on Windows, open up Word and go ahead and type:

Alt + 8203

If you did that correctly, then you’ll see…nothing?

That’s because you just typed a “zero-width space.”

A zero-width space is, for the most part, invisible. It’s a space that you can put into Word and other programs to divide up a long line of text without breaking it up visually. That matters for one big reason: line breaks.

Let me show you an example. Look at this table of filenames I have in Word:

The filenames are too long for the cell width, and there are no spaces dashes or underscores in the file path. So, if I want to tell Word exactly where to put line breaks, I can insert a zero-width space. Here, I’ve stuck one right after “Desktop\”:

As you can see, the filename now wraps right after the slash. But if I were to change the width of the column, the character is invisible. Take a look at this comparison between a zero-width space and a regular space:

The zero-width space lets you handle tables with unpredictable or dynamic widths without breaking things up visually if the line doesn’t have to wrap around. I use it all the time when making tables with long lines of data in it. Often, I’ll do a Find and Replace to insert a zero-width space after every slash. Simply type in Alt + 8203 in the “Replace with” field. You won’t see anything, but it’ll be there.

That way, I can control where the lines break in a table.

And that’s pretty much all there is to the zero-width space. I realize this is a minor and fairly niche tip, but I use it all the time and for someone who is picky about table formatting, it brings me a small amount of joy to be able to control where my lines break in table cells.

So, check it out: zero-width space. Alt + 8203. Fun times!

One more thing. Not on a Windows desktop? You can select all the text in the field below and copy it to your clipboard to get a zero-width space.


2 Comments

2 Comments

  1. Albert Villarino  

    Thank you. I’ve been fighting with this problem for quite a while.

  2. Jamies  

    Not sure it is a good idea within web links as copying the entry to a browser really confuses things.
    also Windows 10 file Explorer UK setup – using alt 8203 gets w character that may well be a sexual denotation character.
    BUT
    Copy as you indicated and Paste at the front of a filename gets files to appear at the top of a list when they should, from what appears to be the first letter appear elsewhere in the list

    And for those who want to be truly obnoxious you can use the (DOS) command window REN command to change the names of files by including the new name in a bounding pair of “” and that’s even better than using the alternate whitespace ALT+0160 (note the leading zero) that looks like an ordinary space.

    Just remember the display (and printing) of such characters depends on the codepage selected or assumed by the OS and app being used, and the quality of your life may depend on the attitude of associates to whom you send ‘stuff’ containing such things.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

To Top