Depends on which slashed zero you need — here’s every method
A slashed zero — a zero with a diagonal line through it — appears in several distinct contexts, and which character you actually need depends on what you’re using it for.
There are multiple different characters that look like a slashed zero, and they’re not interchangeable. Here’s how to identify which one you need and how to type it on every platform.
Which Slashed Zero Do You Actually Need?
Ø — the Latin letter O with stroke (U+00D8), uppercase. A letter in Danish, Norwegian, Faroese, and some other languages. Also used as a symbol in mathematics and engineering for diameter. This is a letter, not a zero.
ø — lowercase version (U+00F8). Same linguistic and technical uses as the uppercase.
0̷ — a regular zero (U+0030) combined with a combining long stroke overlay (U+0338). Creates the appearance of a slashed zero using two Unicode characters. Works in many fonts and contexts.
⌀ — the diameter sign (U+2300). A circle with a horizontal stroke, used specifically in engineering and technical drawings to indicate diameter measurements.
0 with a slash in a specific font — some fonts like Consolas, Courier New, and many programming fonts render the zero character with a built-in slash or dot to distinguish it from the letter O. This isn’t a special character — it’s just how those fonts render the regular zero.
For most people asking about a slashed zero, the answer is one of these three scenarios:
Programming and technical contexts — use a font that renders zeros with a slash built in.
Engineering and technical drawings — use ⌀ (the diameter sign, U+2300).
Scandinavian language writing — use Ø or ø (the O with stroke).
Windows
Method 1: Alt Codes
For Ø (uppercase O with stroke): hold Alt and type 0216 on the numeric keypad.
For ø (lowercase o with stroke): hold Alt and type 0248 on the numeric keypad.
For ⌀ (diameter sign): hold Alt and type 8960 on the numeric keypad.
- Num Lock must be on
- Use the numeric keypad only
Method 2: Character Map
Search for Character Map in the Start menu. Find the character you need — search “slashed” or “stroke” or “diameter” — copy and paste.
Method 3: System-Wide Text Expansion
Use AutoHotkey or Espanso to map a trigger to your chosen character:
::/0::Ø
::dia::⌀
Mac
Method 1: Keyboard Shortcut
For Ø: press Option + Shift + O.
For ø: press Option + O.
These are the methods to remember on Mac — logical because O is the base letter. Works in every application with no setup.
For ⌀ (diameter sign): use the Character Viewer — press Control + Command + Space and search “diameter.”
Method 2: Character Viewer
Press Control + Command + Space and search for “slashed zero,” “stroke,” or “diameter” depending on which character you need.
Method 3: Text Replacement
Go to System Settings → Keyboard → Text Replacements and map triggers like /0 or diam to the characters you use most.
iPhone and iPad
Method 1: Long Press the O Key
Tap and hold the O key on the iOS keyboard. A popup appears with accented and variant versions of O — Ø appears as one of the options. Slide to it and release.
This is the built-in iOS method and requires no setup. Works for Ø and ø immediately.
Method 2: Text Replacement
Go to Settings → General → Keyboard → Text Replacement and add your preferred slashed zero character with a trigger like /0 or diam.
Android
Method 1: Long Press the O Key
On Gboard and most Android keyboards, tap and hold the O key. Ø appears as a long-press variant. Slide to it and release.
Method 2: Gboard Symbol Search
In Gboard, tap the G logo and search “diameter” or “stroke” to find the relevant characters.
Method 3: Add Scandinavian Keyboard
In Gboard settings, add Danish or Norwegian as a keyboard language. Ø is a primary key on these layouts.
Chromebook
Method 1: Unicode Input
For Ø: press Ctrl + Shift + U, type 00d8, press Enter. For ø: press Ctrl + Shift + U, type 00f8, press Enter. For ⌀: press Ctrl + Shift + U, type 2300, press Enter.
Method 2: Add Scandinavian Input Method
Go to Settings → Device → Keyboard → Input Methods and add Danish or Norwegian for direct Ø key access.
Linux
Method 1: Unicode Input
For Ø: press Ctrl + Shift + U, type 00d8, press Enter. For ø: press Ctrl + Shift + U, type 00f8, press Enter. For ⌀: press Ctrl + Shift + U, type 2300, press Enter.
Method 2: Compose Key
With a Compose key configured:
Compose + / + O produces Ø. Compose + / + o produces ø.
Microsoft Word (Any Platform)
Method 1: Alt + X
For Ø: type 00D8 then press Alt + X. For ø: type 00F8 then press Alt + X. For ⌀: type 2300 then press Alt + X.
Method 2: Insert Symbol With AutoCorrect
Go to Insert → Symbol → More Symbols. Find the character, insert it, and set up an AutoCorrect trigger like /O for Ø or dia for ⌀.
Method 3: Alt Codes
Alt + 0216 for Ø, Alt + 0248 for ø, Alt + 8960 for ⌀.
Google Docs
Option + Shift + O on Mac works in Google Docs for Ø. Alt codes work on Windows.
Go to Insert → Special Characters and search “stroke” or “diameter” for any of the variants.
LaTeX
latex
% O with stroke (Scandinavian letter)
\O % uppercase Ø
\o % lowercase ø
% Diameter sign in math
$\diameter$ % requires wasysym package
$\oslash$ % circle with diagonal slash (similar)
\usepackage{wasysym}
$\diameter$ % proper diameter symbol
% Zero with slash for disambiguation
% Most programming fonts handle this automatically
% For explicit slashed zero in text:
$0\hspace{-0.6em}/$ % approximate workaround
HTML
html
<!-- O with stroke -->
Ø <!-- Ø uppercase -->
ø <!-- ø lowercase -->
Ø <!-- Ø decimal -->
ø <!-- ø decimal -->
<!-- Diameter sign -->
⌀ <!-- ⌀ decimal -->
⌀ <!-- ⌀ hex -->
For Programming Fonts: No Special Character Needed
If you want slashed zeros in your code editor, you don’t need a special character at all — you need a font that renders the regular zero with a slash or dot to distinguish it from the letter O.
Fonts that render zero with a distinguishing mark:
With a diagonal slash: Consolas (Windows default), many terminal fonts
With a dot in the center: Fira Code, JetBrains Mono, Cascadia Code, Source Code Pro
With a dot below: Some variants of Courier
In your code editor settings, switch to one of these fonts and the regular zero key produces a visually distinguished zero automatically — no special character needed and no risk of introducing a non-standard character into your code.
Quick Reference Table
| Character | Platform | Method | Shortcut |
|---|---|---|---|
| Ø | Windows | Alt code | Alt + 0216 |
| ø | Windows | Alt code | Alt + 0248 |
| Ø | Mac | Keyboard shortcut | Option + Shift + O |
| ø | Mac | Keyboard shortcut | Option + O |
| Ø / ø | iPhone / iPad | Long press O key | Hold O, slide to Ø |
| Ø / ø | Android | Long press O key | Hold O, slide to Ø |
| Ø | Chromebook | Unicode input | Ctrl + Shift + U, 00d8 |
| ⌀ | Chromebook | Unicode input | Ctrl + Shift + U, 2300 |
| Ø | Word | Code conversion | Type 00D8 then Alt + X |
| ⌀ | Word | Code conversion | Type 2300 then Alt + X |
| Ø / ø | LaTeX | Commands | \O and \o |
The Bottom Line
The right slashed zero depends entirely on what you’re trying to express. For Scandinavian language writing or the diameter symbol in informal contexts, Ø is what you need — Option + Shift + O on Mac, Alt + 0216 on Windows, long press O on mobile. For engineering diameter notation, ⌀ (U+2300) is the correct technical symbol. For programming, just use a font that renders the regular zero with a built-in slash.
On Mac, Option + O and Option + Shift + O are the most natural shortcuts available — the O key is the obvious home for O-derived characters.
There’s no single slashed zero — there’s a Scandinavian letter, an engineering symbol, and a font rendering choice. Know which one you need and the method is straightforward.
Meet Ry, “TechGuru,” a 36-year-old technology enthusiast with a deep passion for tech innovations. With extensive experience, he specializes in gaming hardware and software, and has expertise in gadgets, custom PCs, and audio.
Besides writing about tech and reviewing new products, he enjoys traveling, hiking, and photography. Committed to keeping up with the latest industry trends, he aims to guide readers in making informed tech decisions.