How to Show Hidden Characters in Word, Google Docs and Editors
Every document contains characters that normally stay out of sight: spaces, tabs, paragraph ends, and sometimes zero-width characters and control codes that should not be there at all. When text behaves strangely, the first step is to make those characters visible. This guide shows how to do that in Word, Google Docs, code editors, the command line and a browser-only checker, and what each symbol means.
Three kinds of hidden character
- Formatting marks. Spaces, tabs, line breaks and paragraph ends. Every text has them, and word processors can draw them as symbols on request.
- Invisible Unicode characters. Zero-width spaces, joiners, direction marks, the byte order mark and soft hyphens. They have no shape, and most programs give no sign that they exist.
- Non-printable control characters. The codes from
U+0000toU+001F, the delete characterU+007Fand the range fromU+0080toU+009F. Apart from the tab and the line endings, they do not belong in ordinary text.
A tool that shows the first kind does not always show the other two, so it is worth knowing more than one method.
Microsoft Word
Click the ¶ button on the Home tab, or press Ctrl + Shift + 8 on Windows or Cmd + 8 on a Mac. The same command turns the marks off again.
| Symbol | Meaning |
|---|---|
¶ | End of a paragraph, made with Enter |
· (a raised dot) | A normal space |
° (a small raised circle) | A non-breaking space |
→ | A tab |
↵ (a bent arrow) | A manual line break, made with Shift + Enter |
¬ | An optional hyphen |
| A dotted underline | Text formatted as hidden |
| A dotted line labelled Page Break | A manual page break |
¤ | The end of a table cell |
| A small black square in the margin | A paragraph with a setting such as Keep with next |
To keep particular marks visible all the time on Windows, go to File > Options > Display and tick them under Always show these formatting marks on the screen. None of the marks are printed.
Two dots in a row are an easy way to spot double spaces, and a small circle where you expected a dot explains a line that would not wrap.
Google Docs
Choose View > Show non-printing characters. Docs then marks paragraph ends, line breaks, tabs and spaces, and labels page, section and column breaks. Choose the same menu item again to hide them. Zero-width characters are not among the marks it draws, so for those you need one of the methods further down.
Code editors
Visual Studio Code
- Spaces and tabs: run View: Toggle Render Whitespace from the Command Palette, or change the setting
editor.renderWhitespace. Spaces are drawn as faint dots and tabs as arrows. - Control characters: the setting
editor.renderControlCharacters. - Invisible and look-alike Unicode: the settings under
editor.unicodeHighlight. With the defaults, an invisible character such as a zero-width space is shown in a highlighted box, and hovering over it names the character. - Line endings and encoding: shown in the status bar at the bottom right.
Notepad++
View > Show Symbol > Show All Characters draws spaces as dots, tabs as arrows and line endings as small CR and LF labels. The same submenu can show them separately.
Sublime Text
Add "draw_white_space": "all" to your settings to see spaces and tabs everywhere, not only in selected text.
Vim
Type :set list to show tabs and line ends, and :set nolist to hide them. With the cursor on a character, ga prints its code, which identifies anything suspicious.
JetBrains editors
In IntelliJ IDEA, PyCharm and their relatives, use View > Active Editor > Show Whitespaces.
Spreadsheets
Excel and Google Sheets have no switch for showing hidden characters, but formulas can reveal them. Compare what you see with what the cell holds:
=LEN(A1)
If the length is larger than the number of characters you can count, something is hiding. To identify the character at a given position, here the first:
=UNICODE(MID(A1, 1, 1))
The result is a decimal code: 160 is a non-breaking space, 8203 a zero-width space, 9 a tab, 10 a line feed. Keep the built-in cleaners in proportion: TRIM removes ordinary spaces only, and CLEAN removes the control codes numbered 0 to 31. Neither touches a non-breaking space or a zero-width space.
Command line
On macOS and Linux, cat can mark the usual suspects:
cat -vet file.txt
Each line then ends in $, a tab appears as ^I, a carriage return as ^M, and bytes outside plain ASCII appear in a notation starting with M-. For an exact view of every byte, use a hex dump:
hexdump -C file.txt | head
To list only the lines that contain something other than plain ASCII:
perl -ne 'print "$.: $_" if /[^\x00-\x7F]/' file.txt
A browser-only checker
When you just want to know what is in a piece of text, paste it into the AI Text Cleaner. The check runs in your browser and the text is not sent anywhere. If the text contains unusual characters, a list titled Characters found in your text opens under the boxes with three columns: the code, the name and how many times it occurs.
The list covers invisible format characters such as the zero-width space, joiners, direction marks, the byte order mark and the soft hyphen; special spaces such as the non-breaking space and the thin space; control codes; and the hidden tag characters. Three things it does not do:
- It does not list ordinary spaces, tabs or line endings, because every text has those.
- It gives a count for each character, not its position in the text.
- It does not flag blank-looking letters such as the Hangul filler. Those are described in our guide to invisible characters.
The cleaned version on the right has the listed characters removed or replaced according to the options you leave switched on.
What the common hidden characters mean
| Code | Name | What it usually tells you |
|---|---|---|
U+00A0 | No-break space | The text came from a web page or a word processor |
U+200B | Zero-width space | Copied from a web page, chat app or CMS |
U+200D | Zero-width joiner | Often part of an emoji; otherwise a stray |
U+FEFF | Byte order mark | The start of a file was copied along with its contents |
U+00AD | Soft hyphen | The source had hyphenation points built in |
U+200E, U+200F | Direction marks | The text passed through software that handles right-to-left languages |
U+000D | Carriage return | Windows line endings |
U+001B | Escape | Colour codes from terminal output were saved to a file |
U+0000 | Null | A binary file, or text in a two-byte encoding read as single bytes |
None of these says anything certain about who or what wrote a text. They are traces of the programs the text passed through. For the line-ending characters, see our guide to the carriage return and line feed.
Quick answers
How do I show hidden characters in Word? Click the ¶ button on the Home tab, or press Ctrl plus Shift plus 8 on Windows and Cmd plus 8 on a Mac.
What is the difference between hidden characters and non-printable characters? Hidden is the everyday word for anything you cannot see, including spaces and paragraph marks. Non-printable usually means the control codes, which were never meant to be displayed.
Can I see zero-width characters in Google Docs? Not with the built-in view, which shows spaces, tabs and breaks. Paste the text into a checker or a code editor that highlights invisible Unicode characters.