---
name: "toascii"
section: "3"
platform: "macos"
package: "Libc"
version: "1752.120.2"
release: "macOS 26.5"
platforms: ["linux", "freebsd", "macos"]
url: "https://new.carta.tech/toascii"
---

# toascii(3)

convert a byte to 7-bit ASCII

## NAME

**toascii** – convert a byte to 7-bit ASCII

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<ctype.h\>**

*int*\

**toascii**(*int c*);

## DESCRIPTION

The **toascii**() function strips all but the low 7 bits from a letter, including parity or other marker bits.

## RETURN VALUES

The **toascii**() function always returns a valid ASCII character.

## SEE ALSO

[digittoint(3)](/digittoint/3.md), [isalnum(3)](/isalnum/3.md), [isalpha(3)](/isalpha/3.md), [isascii(3)](/isascii/3.md), [iscntrl(3)](/iscntrl/3.md), [isdigit(3)](/isdigit/3.md), [isgraph(3)](/isgraph/3.md), [islower(3)](/islower/3.md), [isprint(3)](/isprint/3.md), [ispunct(3)](/ispunct/3.md), [isspace(3)](/isspace/3.md), [isupper(3)](/isupper/3.md), [isxdigit(3)](/isxdigit/3.md), [stdio(3)](/stdio/3.md), [tolower(3)](/tolower/3.md), [toupper(3)](/toupper/3.md), [ascii(7)](/ascii/7.md)
