The vertical line or bar (|) is a symbol that has been on keyboards for a while and it’s used a lot in programming and shell scripting in Unix systems. Its also used to represent the absolute value in maths. You can also use it to break up the text.

Most modern keyboards and US keyboards have a vertical line on the same key as the slash. To type the vertical line on your keyboard, hold Shift and press the slash key. A vertical line should appear. If you don’t have this key or can’t find it for some reason, you can use different codes or the character map on your Windows or Mac PC.

Microsoft Programs

If you’re on Microsoft programs such as Word, Excel, or PowerPoint, you can type the vertical line using an Alt + X code. This can be used if you have a keyboard that doesn’t have a number keyboard and you’re on a Microsoft program like Word. To type the vertical line, press 007C + Alt + X.

If your keyboard has a number keyboard, then you can type the vertical line using an Alt code – this consists of you pressing a few numbers whilst holding the Alt key. The numerical keyboard is on the right-hand side of your keyboard – most desktop keyboards have a numerical keyboard. If you’re using a laptop, you’ll only see the numbers in the top row of your keyboard and not on the right. To type the vertical line on your keyboard, type 124 whilst holding Alt.

If you have a laptop or keyboard without a numeric keypad, then you’ll need to use keyboard 7, 8, 0, U, I, O, J, K, L, and M. These keys are alternatives to 0-9 when Num Lock is activated. M=0, J=1, K=2, L=3, U=4, I=5, O=6, 7=7, 8=8, 9=9. If you haven’t got a numeric keypad:

1. Hold Fn + NumLk to enable Num Lock.

2. Hold the Alt key and type 124. Remember which number corresponds to regular keypads without a numeric keypad. So 1=J, 2=K, 4=U.

3. Let go of all the keys and you should see the vertical line in your text.

Windows Character Map

If you’re confused by the Alt code, then you can just use the Map installed on your computer.

Character Map

1. Open the Start menu and open the Character Map.

2. In Search for, vertical line and double-click on it to make it appear in Characters to copy.

3. Select Copy to copy the symbol and then you can paste it within your text.


1. Go to the Finder > Emoji & Symbols.


2. In the Search bar, search for vertical line.

3. Right-click the vertical line and select Copy Character Info. This will add it to the keyboard.

4. Paste the vertical line within your text.