All Tools

ASCII Tools: Validate, Transliterate, Flip Bits, UTF-8

Convert Unicode to plain ASCII, find non-ASCII characters, validate UTF-8 bytes or files, show ASCII as UTF-8 bytes, flip or shuffle ASCII bits, and generate ASCII characters, random ASCII or random UTF-8. Nothing is uploaded.

Characters with no ASCII spelling

0 characters, 0 bytes

0 characters, 0 bytes


About the ASCII Tools

The ASCII Tools gather small, precise operations on ASCII and UTF-8 text in one place. Choose an operation from the list; each has its own options and the result updates as you type. You can transliterate Unicode text to plain ASCII, check text for characters outside ASCII, show the UTF-8 bytes of ASCII text, validate a byte sequence or a file as UTF-8, flip or shuffle the bits of each 7-bit code, list the characters of a class in a code range, and generate random ASCII or random UTF-8 text. Input is limited to 1,000,000 characters and files to 10 MB. All processing happens in your browser and nothing is sent to a server.

Operations

Unicode to ASCII

Rewrites text using only ASCII characters. The text is first decomposed with Unicode compatibility decomposition (NFKD), which splits é into e plus a combining acute accent and turns ligatures such as fi into fi; the combining marks are then dropped. Letters with no decomposition are spelled out from a short in-house list: ß becomes ss, æ becomes ae, ø becomes o and ł becomes l. Curly quotes become straight quotes, dashes become hyphens and the ellipsis becomes three full stops. Anything left, such as Chinese characters or emoji, is removed or replaced with ?, as you choose. The same operation serves both the Unicode to ASCII and the UTF-8 to ASCII pages, because UTF-8 is simply how that Unicode text is stored.

Validate ASCII

Lists every character above U+007F with its position, line, column and code point, so you can find the stray non-breaking space or curly apostrophe that breaks a config file. Positions count characters, so an emoji counts once.

ASCII to UTF-8 bytes

Shows the bytes of ASCII text in hex. UTF-8 was designed so that every ASCII character is stored as the same single byte, so the bytes equal the ASCII codes. Any character outside ASCII is reported instead.

Validate UTF-8 bytes

Type hex bytes, such as C3 A9 or 0xE2,0x82,0xAC, or choose a file. The checker follows the well-formed byte sequences of the Unicode Standard and names the first problem and its byte offset: an overlong encoding (C0 80 for U+0000), an encoded surrogate (ED A0 80), a code point above U+10FFFF (F4 90 80 80), a truncated sequence that stops before its last byte, a continuation byte with no lead byte, or a byte such as FF that never appears in UTF-8. Valid input is decoded and shown as text.

Flip and shuffle bits

Flip ASCII bits inverts the chosen bits of each 7-bit code. Bit 5 (value 32) is the difference between capital and small letters, so flipping it swaps the case of every letter. Shuffle ASCII bits moves the seven bits of each code to random new places. Results that land on a control code are shown as \xNN escapes so they stay visible.

Generators

Generate ASCII characters lists every printable character, letter, digit, punctuation mark or control code in a range of codes. Generate random ASCII builds strings of a chosen length from capitals, small letters, digits, punctuation and space. Generate random UTF-8 produces valid text from chosen scripts, from one-byte ASCII to four-byte emoji, and shows the UTF-8 byte count. Random choices come from the browser's cryptographic random number generator.

Related tools

To see the codes behind each character in binary, octal, decimal or hex, use Text to Binary. Percent-encoding with the URL Encoder and Decoder and Base64 are the usual ways to carry bytes through systems that only accept ASCII.

Open-source credits

Every operation is implemented in-house on this site. Transliteration follows Unicode Standard Annex #15 (normalisation forms) for NFKD, plus a small in-house table. UTF-8 validation follows RFC 3629 and Table 3-7 of the Unicode Standard. The character classes follow ANSI X3.4-1986 (US-ASCII).

Frequently asked questions

Is every ASCII file also a valid UTF-8 file?

Yes. UTF-8 stores the 128 ASCII characters as single bytes with exactly the same values, and every multi-byte UTF-8 sequence uses only bytes from 128 upwards. So a file containing nothing but ASCII is valid UTF-8 byte for byte, with no conversion needed.

What is an overlong UTF-8 encoding?

It is a character written with more bytes than it needs, such as C0 AF for the slash, whose correct form is the single byte 2F. Overlong forms are invalid because attackers once used them to slip characters past filters that only looked for the short form.

Why is the transliteration not always perfect?

Turning Unicode into ASCII loses information, and the right spelling depends on the language: German ü is often written ue, while Spanish ü is just u. This tool uses one general rule, dropping accents and spelling a few special letters, so check names and other important text by eye.

Why is the random UTF-8 text full of unusual characters?

Every code point of the chosen scripts is equally likely, and large blocks such as the 20,992 CJK ideographs dominate the mix when they are selected. Untick the scripts you do not need, or keep only ASCII and Latin, for text that looks more like everyday writing.

What does flipping bit 6 do to ASCII text?

Bit 6 has the value 64. Flipping it moves capital letters down into the control code range, so A (65) becomes 1, shown as the escape \x01, and turns most control codes into capitals or symbols. Old terminals used the same relationship for Ctrl key combinations, such as Ctrl+A sending code 1.

Other related tools