Celeb Glow
general | February 26, 2026

How can I write the null character on a Macbook Pro?

How can I write a null character on a Macbook Pro? I'd prefer to use just the keyboard or something that I can reach everywhere, without using a third-party program.

5

2 Answers

You can do this with the Unicode Hex Input method (enable it in System Preferences -> Language & Text pane -> Input Sources tab, then select it from the menu item) by holding Option and typing "0000".

Warning: the null character is not allowed in C-language strings (it's used to indicate the end of the string), so not all programs will cope with it. In TextEdit, for example, you can insert a null into a document, but when you save the document it'll only save the part before the null.

5

Depends on your terminal, in Terminal.app and Iterm2 you can use ^@ (Ctrl+Shift+2). See here.

5

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy