White space

Updated: 11/04/2017 by Computer Hope

Alternatively called spacing or whitespace, white space is any section of a document that is unused or space around an object. White spaces help separate paragraphs of text, graphics, and other portions of a document, and helps a document look less crowded. Using white space effectively in a document keeps the reader reading the document, and helps the reader quickly find what they are interested in reading.

How to create white space

White space is created by pressing the Return key, spacebar key, or the Tab key, and can also be created by setting the document's margins and inserting form feeds or tables.

Replacing white space or extra spaces

Using our online text tool, you can remove and replace white space or extra spaces in any text.

Spacing in Microsoft Word

Microsoft Word spacing

In Microsoft Word, Spacing is a feature under the Page Layout tab in the Paragraph section. It can increase or decrease the spacing above (before) and below (after) each line of text. By default, the spacing is set to Before: 0 pt and After: 10 pt as shown in the picture.


To see the spacing around a line of text, highlight the line that highlights the spacing around the text.

Every space has a dot in my document

If formatting marks are enabled in a document, each space has a small dot to represent the space character. You can disable this feature by turning off formatting marks.

White space in a regular expression

With many programming languages and when working with a regular expression, white space is matched using the \s escape sequence. For example, with the Perl code below if the $example variable contains any space, the script would print "I found white space!" when ran.

if ($example =~ /\s/) { print "I found white space!"; }

How to handle spaces in the command line

When working on the command line, you may encounter errors when typing a file name with spaces. You can prevent errors by surrounding any files with spaces with quotes to help identify where a file begins and ends.

Double space, Keyboard terms, Line space, Nbsp, Space, Typography terms, Underscore, Word processor terms