---
name: "toascii"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd", "macos"]
url: "https://carta.tech/man/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)](/man/digittoint/3.md), [isalnum(3)](/man/isalnum/3.md), [isalpha(3)](/man/isalpha/3.md), [isascii(3)](/man/isascii/3.md), [iscntrl(3)](/man/iscntrl/3.md), [isdigit(3)](/man/isdigit/3.md), [isgraph(3)](/man/isgraph/3.md), [islower(3)](/man/islower/3.md), [isprint(3)](/man/isprint/3.md), [ispunct(3)](/man/ispunct/3.md), [isspace(3)](/man/isspace/3.md), [isupper(3)](/man/isupper/3.md), [isxdigit(3)](/man/isxdigit/3.md), [stdio(3)](/man/stdio/3.md), [tolower(3)](/man/tolower/3.md), [toupper(3)](/man/toupper/3.md), [ascii(7)](/man/ascii/7.md)
