CSV formula injection: check data with KrobClick before sharing

CSV files containing product names and customer messages may look like ordinary data, but spreadsheet applications can interpret some text as formulas. This guide helps inspect and reduce that risk, separately from corrupted Thai text.

A shield and magnifier inspect table fields, representing CSV checks before sharing

CSV is text, but spreadsheet programs may interpret some values as formulas

CSV (Comma-Separated Values) stores text in cells, but Excel and some spreadsheet programs may read values beginning with =, +, - or @ as formulas rather than the text the sender intended. When someone else's input becomes an instruction, the risk is called CSV formula injection (OWASP)

Consider =1+1 in a notes cell. Some spreadsheets may show 2 That harmless calculation shows that what the spreadsheet displays may differ from the original text.

Which CSV values can be read as formulas?

Start with columns others can fill in, such as product names, comments and notes, especially in files destined for a spreadsheet. Check values beginning with =, +, -, @ or certain control characters. Behavior varies by program and locale. Check delimiters and quotation marks too: malformed CSV may split one cell across several columns.

Not every negative value is an attack. -10 may be a valid amount. Check whether that column is supposed to contain numbers or text and whether the recipient needs to calculate with it.

Use KrobClick CSV Editor to inspect and export carefully

  1. Open KrobClick's CSV Editor and choose a CSV/TSV file or paste CSV text to view it as a browser-based table.
  2. Inspect columns supplied by other people first. Check the first characters and make sure delimiters have not shifted values into other columns.
  3. Open 'Settings', find 'Downloaded file' and consider 'Prefix values that could be read as formulas with an apostrophe'. It changes exported text, not the values shown in the table.
  4. Download a new file and open it using the recipient's program and import method. Check for formulas, shifted columns and values needed for calculations.

CSV Editor stores values as text, does not evaluate formulas and processes data on your device. If you enable data retention, the table and settings remain in this browser profile; take care on shared devices. Correct display in the web table does not establish how Excel will open the downloaded file.

With the protective option enabled, the tool prefixes detected values with an apostrophe, including -10, which may be an ordinary number. The exported file therefore differs from the visible table. Tell recipients who need to calculate with that column.

The tool checks for =, +, - and @ after whitespace, including an initial tab or newline. It does not check full-width characters such as = and @, which OWASP says may trigger formulas in some environments. The tool's warnings are not a comprehensive security scan.

Why checks are still needed after adding an apostrophe

OWASP WSTG warns that no single method works reliably across all programs and workflows, especially when a file is opened, saved and reopened in Excel. An apostrophe reduces risk in some cases, but you still need to test with the destination program.

If another system imports the CSV automatically, the prefix may change the data's meaning. Agree on a format with the recipient, test the complete import and check the data source before sending, even with the protective option enabled.

A more secure CSV forwarding process

Keep the original separate from the viewing copy. Review unfamiliar data before export and ask recipients to import columns as text when appropriate. Explain that the file contains data, not formulas to run. Limit sharing of personal information.

Garbled Thai text or missing leading zeros are separate problems. See Import CSV into Excel while checking encoding and data types for import guidance, but fixing encoding does not remove formula risks.

Open toolCSV editorCheck for values that might be interpreted as formulas before forwarding the file.

Sources

OWASP documentation and CSV Editor code reviewed October 16, 2026. No Excel version was tested for open/save/reopen behavior. Apostrophes alter exported data and do not guarantee protection in every program.