Skip to content
ASCII World

Graphic character

Graphic character - quick reference

A graphic character produces a visible mark when rendered - a letter, digit, symbol, or punctuation mark. In ASCII, the 94 graphic characters occupy codes 33-126 (the printable characters minus space, which is classified separately). Code 65 (A) is a graphic character; code 10 (LF) is not.

The distinction matters in parsing and validation. The POSIX [:graph:] character class matches exactly these 94 characters. [:print:] adds space. [:cntrl:] matches control characters. When sanitizing user input or building regex patterns, choosing the right character class prevents subtle bugs - [:graph:] rejects tabs and newlines that [:print:] would also reject but that a naive "printable" check might miss.

Related Terms