What are invisible characters?
Invisible characters are whitespace or control characters that don't display visibly but affect how computers read and process data. They're often inserted unintentionally when copying from web pages, PDFs, Word documents, or certain tools.
The most common culprits are:
A BOM can hide the first column
A 3-byte marker (EF BB BF) at the start of a UTF-8 file. Excel uses it to recognise UTF-8, but some importers read it as part of the first header, so a column called Name isn't found.
Zero-width spaces break matching and search
Invisible character copied from web pages that prevent 'John' from matching 'John' in your database. Breaks deduplication.
Non-breaking spaces cause validation failures
Spaces that look like regular spaces (U+00A0) but aren't removed by Excel's TRIM. Email validation fails: 'john@example.com ' (with invisible space) != 'john@example.com'.
Control characters corrupt entire rows
Hidden characters like NULL (U+0000) or line separators can break CSV parsing entirely, making rows unreadable.
Stray line endings break rows
Most importers accept Windows (CRLF) or Unix (LF) line endings. A file that mixes them, or a stray carriage return inside a value, can leave blank or broken rows.
Real example:
How invisible characters break imports:
What you see: | What the system sees: ----------------------|------------------------ Name, Email, Status | [BOM]Name, Email, Status John, john@ex.com, ✓ | John, john@ex.com[NBS], ✓ Jane, jane@ex.com | Jane, jane@ex[ZWS].com [BOM] = Byte Order Mark (invisible at start) [NBS] = Non-Breaking Space (invisible at end) [ZWS] = Zero-Width Space (completely invisible) ❌ First column "Name" not found ❌ Email validation rejects valid emails ❌ Deduplication fails (same person looks different)
The tricky part: You can't see these characters visually, so the CSV looks fine in Excel or Google Sheets. But the import system sees them and rejects the data.
Common invisible character problems
BOM at the start of the file
Where it comes from:
Excel's CSV UTF-8 format, and editors set to save 'UTF-8 with BOM'
What you see:
The first header shows as 'Name', or the import says the first column is missing
What breaks:
Only the first column. Many importers handle a BOM without trouble, so remove it only when one doesn't.
Non-breaking spaces (U+00A0) in data
Where it comes from:
Copied from web pages, PDF documents, or Word
What you see:
Looks like a regular space but won't trim or match
What breaks:
Emails won't validate. Deduplication misses duplicates. Search fails.
Zero-width spaces (U+200B)
Where it comes from:
Copied from web pages, chat apps or formatted documents
What you see:
Characters look connected but validation treats them as separate
What breaks:
Name matching breaks. 'John Smith' won't match duplicate 'John Smith' (invisible space)
Tab characters instead of spaces
Where it comes from:
Text copied from formatted documents or code editors
What you see:
Data looks aligned but contains tab characters
What breaks:
Tools that guess the delimiter can mistake the file for tab-separated.
Mixed line endings (LF vs CRLF)
Where it comes from:
Edited on both Mac/Linux and Windows, or concatenated files
What you see:
Invisible but affects how rows are read
What breaks:
Some importers show blank rows or split a row in two.
NULL bytes (U+0000) in the middle of text
Where it comes from:
Corrupted data from database exports or improper encoding conversions
What you see:
Text appears truncated but no visible character is missing
What breaks:
CSV parsing breaks entirely for that row. Data becomes unusable.
Types of invisible characters
Here's a reference of common invisible characters and what they do:
BOM (Byte Order Mark)
Unicode:
EF BB BF (UTF-8)
Appears as:
First byte of file
Non-breaking space
Unicode:
U+00A0
Appears as:
Looks like a space, but Excel's TRIM leaves it
Zero-width space
Unicode:
U+200B
Appears as:
Completely invisible, no width
Zero-width joiner
Unicode:
U+200D
Appears as:
Invisible, used to connect characters
Tab character
Unicode:
U+0009
Appears as:
Looks like spaces
NULL byte
Unicode:
U+0000
Appears as:
Completely invisible
Carriage return (CR)
Unicode:
U+000D (\r)
Appears as:
Invisible line break (Windows uses CR followed by LF)
Line feed (LF)
Unicode:
U+000A (\n)
Appears as:
Invisible line break
How to detect invisible characters
Since invisible characters don't display, you need tools to find them:
Method 1: Use a text editor with special characters visible
VS Code (free):
- Open your CSV file
- Go to View → Render Whitespace
- Invisible spaces and tabs will show as dots (·) and arrows (→)
Notepad++ (free, Windows):
- Open your CSV file
- View → Show Symbol → Show All Characters
- Invisible characters appear as visible symbols
Method 2: Check the file encoding
In VS Code:
- Look at bottom right corner
- It shows the file encoding (UTF-8, UTF-8 with BOM, Latin-1, etc.)
- "UTF-8 with BOM" only matters if the importer can't find your first column
On Mac: Use Terminal command: file -b your-file.csv
Method 3: Check for BOM specifically
Open the file in a hex editor or Terminal to see the first bytes:
Method 4: Copy & paste test
In Excel or Google Sheets, compare a value's length with what you can see:
- Enter
=LEN(A2)next to the value - "john@example.com" is 16 characters. If LEN says 17 or more, something invisible is in there
How to fix invisible characters
Step 1: Remove BOM if present
In VS Code:
- Click the encoding indicator (bottom right)
- Select "Save with Encoding"
- Choose "UTF-8" (without BOM)
- File is resaved without the BOM marker
From Excel:
Excel's CSV UTF-8 format always adds a BOM. If an importer can't handle it, resave the file in a text editor as above, or download it as CSV from Google Sheets, which doesn't add one.
Step 2: Remove non-breaking and zero-width spaces
In Excel, with a formula:
This turns non-breaking spaces into normal ones, removes zero-width spaces, then trims. Copy it down a helper column and paste the results back as values.
In Excel, with Find & Replace:
- Press Ctrl+H
- In Find what, hold Alt and type 0160 on the number pad (Windows) to enter a non-breaking space
- In Replace with, type a normal space
- Click Replace All
Or in a text editor (VS Code):
- Find & Replace (Ctrl+H) and turn on regex (the
.*icon) - Find
\u00A0, replace with a normal space - Find
[\u200B\u200C\u200D], replace with nothing
Don't replace \s+ across a whole file: it matches line breaks too, and joins every row into one.
Step 3: Fix line endings (Windows vs Mac/Linux)
Only needed if the importer shows blank or broken rows. Most accept either style; what matters is one style throughout:
In VS Code:
- Look at the bottom right corner
- Click where it shows "CRLF" or "LF"
- Pick one, CRLF or LF, and save
- Every line now ends the same way
Step 4: Use TRIM to clean leading and trailing spaces
In Excel or Google Sheets:
Step 5: For serious corruption, re-export from the source
If invisible characters are embedded throughout the file, the safest approach is to re-export from the original source:
- Export from your database or system directly as CSV
- Don't copy/paste from web pages or PDFs
- Save directly to CSV, don't open in Excel first
- Verify the file opens correctly before importing
Best practices to prevent invisible characters
Related issues: Invisible characters are often related to encoding problems. See also:
Avoid invisible character problems at the source
The best way to prevent invisible character issues is to collect data through forms instead of spreadsheets. Users fill out a clean form, you get data without file-level corruption (no BOM markers, encoding mismatches, or line ending issues).
Learn more about Import Builder