Blog

How to check a CSV file's encoding before import

Preview a CSV before importing it, spot signs of the wrong text encoding, and choose a safer import option without changing the original file.

Emily ParkerTools and utilities 4 min read

A CSV can look fine in one program and show garbled names or symbols in another. The problem may be the file's text encoding, which determines how stored bytes become letters and numbers.

Use the CSV Editor to preview the file before importing it elsewhere. The preview can reveal problems, but it cannot always tell you exactly which encoding the file uses. Here is how to inspect what you can and choose a reliable next step.

Inspect the CSV before importing it

  1. Open the CSV Editor and open the CSV file you plan to import. The file stays on your device while you inspect it.
  2. Check the first rows, including the column headings. Look closely at names, accented letters, currency symbols, curly quotes, and text in languages other than English.
  3. Compare a few cells with a trusted source, such as the original export or a copy of the data shown in the system that created it. A preview that looks readable is useful, but it does not prove that every program will read the file the same way.
  4. Check whether values appear in the expected columns. If a row is split into the wrong number of columns, the separator may be the issue rather than the encoding.
  5. Keep the original file unchanged. If the preview looks wrong, ask whoever created the file which encoding they used before trying an import setting.

What the preview tells you

Names and symbols look correct

The file displays as expected in the CSV Editor. That is a good sign, but another app may interpret the same bytes differently. If your destination app has an import preview, check the characters there too before completing the import.

Accented letters turn into odd sequences

Text such as café might appear as café when UTF-8 bytes are interpreted using a different encoding. This is a common clue that the reader and file do not agree. Confirm the source encoding, then select that encoding in the destination app's import options. For more examples, see how to fix strange characters in a CSV.

You see replacement symbols

A black diamond with a question mark, or the replacement character �, can mean the program could not decode some bytes. The original characters may not be recoverable from this preview alone. Return to the source and export the file again with a known encoding if you can.

Columns appear shifted or combined

This is usually a; not an encoding problem. A comma, semicolon, or tab separates fields in a CSV. In the import preview, choose the separator that matches the file. If the columns line up but letters look corrupted, investigate the encoding instead.

How to fix a suspected encoding mismatch

  1. Confirm how the file was saved. Ask the sender or check the exporting program's settings. UTF-8 is common for files shared between modern apps, but older software may use an encoding such as Windows-1252. The .csv extension does not identify the encoding.
  2. Import the file instead of opening it directly. In Excel for Windows, use Data > From Text/CSV. On macOS, use Data > Get Data (Power Query) > From Text/CSV if that option is available in your version. Some versions have a different text import flow. In the preview, look for a file origin or encoding choice and select the encoding confirmed by the source.
  3. Check the import preview before proceeding. Look at several rows with accented characters and symbols, not just the headings. If they still look wrong, cancel and try again with the source's confirmed encoding rather than accepting a damaged import.
  4. Request a fresh export if the encoding is unknown. Ask for a UTF-8 CSV if the destination supports it. If the destination requires another encoding, ask for that specific format instead. Keep the original as a reference while you check the new copy.
  5. Verify the imported data. Compare a few rows with the source, especially names and values containing punctuation or non-English characters. Also check that the columns stayed aligned, since encoding and separator settings are separate.

A file can appear mostly readable even with the wrong encoding. Avoid choosing a setting just because the first few rows look plausible. Some incorrect choices produce readable but altered characters.

Encoding and separators are different

Encoding controls which characters appear. The separator controls where one field ends and the next begins. For example, a CSV exported from a regional settings setup may use semicolons between fields, while another app expects commas. That can make a preview look badly arranged even though the letters decode correctly.

Check both in the destination app's import preview: first choose the separator that puts each value in the right column, then confirm the characters look right. Changing a separator will not repair garbled accents, and changing an encoding will not split combined columns.

The CSV Editor lets you inspect the file in your browser. Your file stays on your device.