Convert ANSI to ASCII
Convert Windows code-page text to strict ASCII while checking character loss and compatibility.
Make ASCII files online
We can't read ANSI files yet, so this conversion isn't available. If you can export your work to one of these formats, we'll turn it into ASCII:
Want to convert ANSI to ASCII?
Let us know. We pick the conversions to add next by how many people ask for them.
How to convert ansi to ascii file
- Other formats
- No ratings yet.
What ANSI means
ANSI is usually an imprecise name for a Windows character encoding, not a single file format. Common code pages include Windows-1252 for Western European text, Windows-1251 for Cyrillic, and Windows-1250 for Central European text. Older Windows editors, DOS utilities, accounting systems, and export programs commonly produce files described as ANSI.
The exact source encoding cannot be determined reliably from the filename or bytes alone. Identify the code page from the program that created the file, its documentation, or the language and characters in the content. “ANSI” can also describe terminal escape sequences used for colored or positioned text; changing the character encoding does not remove or interpret those sequences.
What ASCII provides
ASCII defines 128 values, including Latin letters, decimal digits, punctuation, whitespace, and control characters. A strict ASCII file contains only bytes from 0x00 through 0x7F, usually without a byte-order mark. This supports older hardware, command-line tools, data-import systems, and devices that reject bytes above 127.
ASCII cannot represent accented letters, curly quotation marks, em dashes, most non-Latin alphabets, emoji, or other Unicode characters. Conversion must therefore transliterate a character, such as é to e, or replace it, commonly with ?. The result can lose information and cannot be reconstructed reliably. ASCII is not necessarily smaller than the original code-page file: both commonly use one byte per character.
Convert with iconv
- Determine the real source code page. Use
CP1252only when the file is actually Windows-1252; do not treat every file labelled ANSI as CP1252. - On macOS or Linux, run:
iconv -f CP1252 -t ASCII//TRANSLIT input.txt -o output.txt - Open
output.txtin a byte-aware editor and search for question marks or missing characters. Check line endings if the receiving system requires CRLF or LF.
Replace CP1252 with the correct source name, such as CP1251. //TRANSLIT asks the installed iconv implementation to approximate unsupported characters; its results vary by platform. Without transliteration, use -t ASCII; unsupported characters generally produce an error rather than a valid complete output. Keep the original file until the output has been verified.
Convert with desktop software
Editors such as EmEditor, UltraEdit, and BBEdit can open a file using a specified Windows code page and save it as US-ASCII or ASCII. Open the file through File → Open, select the known source encoding, then use File → Save As and choose the explicit ASCII encoding. Selecting “ANSI” on export is not sufficient: that normally writes the active Windows code page and may retain bytes above 127.
Notepad++ can inspect or reopen a file with a selected encoding, but its Encoding → Convert to ANSI command means the active Windows code page, not strict ASCII. Use an explicit ASCII option if the installed version provides one, or use Notepad++ to correct the source interpretation and then convert with iconv or another editor that explicitly supports US-ASCII.
Use an online converter
For a small, nonconfidential text file, a reputable browser-based character-encoding converter such as Browserling’s text encoding converter can convert from the selected Windows code page to ASCII. Choose the actual source code page, select ASCII or US-ASCII as the destination, convert, and download the result.
Do not upload passwords, personal data, proprietary code, or regulated records. A local converter avoids transferring the file and provides better control over errors and retained copies.
Check compatibility and data loss
Decoding with the wrong source encoding corrupts characters before the ASCII conversion begins. Windows-1252 and ISO-8859-1 are similar but not identical: bytes used for smart quotes, the euro sign, and other Windows characters can be misread when treated as ISO-8859-1.
Review every non-ASCII character in the source, especially names, addresses, measurements, quotation marks, and currency symbols. Confirm that the output contains no bytes above 0x7F; on Unix-like systems, LC_ALL=C grep -n '[^ -~]' output.txt can help locate non-ASCII bytes, although it also flags tabs and other control characters. Check whether the target requires a particular line ending and whether it rejects ANSI terminal escape sequences.
If the receiving system accepts UTF-8, use UTF-8 instead of ASCII. UTF-8 preserves the original characters and is broadly supported, while strict ASCII conversion is appropriate only when the target specifically requires 7-bit data.