A CSV file is plain text, but when it is opened in Excel, LibreOffice Calc or Google Sheets, a cell whose text starts with =, +, - or @ can be read as a formula instead of text. If the CSV is an export of data that other people typed in, a cell like =HYPERLINK(...) can send you to a web address or run a command when someone opens it. That is called CSV, or formula, injection.
This tool scans a CSV file, lists every such cell with its row, column and reason, ranks the risk, and writes a cleaned copy in which only those cells are changed. It is a defensive safety utility, not an antivirus. The file is processed in your browser and is not uploaded.
Loading the tool…
Overview
About CSV Formula Injection Scanner & Cleaner
What counts as risky. Following the OWASP guidance on CSV injection (CWE-1236), a cell is flagged when its text begins with =, +, - or @, or with a tab or carriage-return character that can hide the sign. Each flagged cell gets a level:
- High: the cell also looks like a command or DDE call (
program|topic!item,cmd,powershell) or calls a function that can fetch data or run something (HYPERLINK, WEBSERVICE, IMPORTXML, IMPORTDATA, IMAGE and similar). - Medium: any other cell that starts with
=, or with+,-or@followed by text, or with a hidden tab. - Low: cells that start with one of those characters but look like plain numbers, phone numbers or social handles (
-12.5,+8801712345678,@jane). Spreadsheets mostly read these as numbers, so they are shown but not changed by default.
The parser reads RFC 4180 CSV: quoted fields, doubled quotes, line breaks inside quotes, comma, semicolon, tab and pipe delimiters detected automatically, UTF-8 with or without a byte-order mark, UTF-16 and a Windows-1252 fallback.
The cleaner rewrites only the flagged cells. By default it puts an apostrophe in front, as OWASP recommends; you can choose a space instead, and choose which levels to change. Everything else in the file, including quoting and line endings, stays byte for byte as it was. You get a table of the first changes (before and after), the cleaned CSV, and a CSV report of every flagged cell whose own text is neutralised so the report cannot trigger a formula itself.
Know the trade-off. A leading apostrophe or space makes the cell text, not a formula, but it changes the stored value (and Excel shows the apostrophe when it opens a CSV). Do not clean cells that are meant to be real formulas.
Read more. The guide CSV injection explained covers how a cell becomes a formula and how to export safely.
Compatibility
Supported Formats
Text files with delimiters: .csv, .tsv and .txt up to 40 MB; UTF-8 (with or without BOM), UTF-16 and Windows-1252. Output: the cleaned file in UTF-8 (with a BOM if the original had one or was not UTF-8) and a CSV report. Spreadsheet files (.xlsx, .xls) are not supported; export them to CSV first.
Guide
How to Use CSV Formula Injection Scanner & Cleaner
- Drop a .csv, .tsv or .txt file onto the box. It is scanned in your browser.
- Read the verdict and the table of flagged cells: row, column, level, the cell text and why it was flagged.
- Choose how to protect cells (apostrophe or space) and which levels to change. The before and after table updates.
- Download the cleaned CSV, and the report if you need to show someone what was found.
Highlights
Features
- Row, column and reason Every flagged cell with its position, text and an explanation of the risk.
- Risk levels High, medium and low, so numbers and handles do not drown out real formulas and DDE calls.
- Cleaned copy Only the flagged cells change; apostrophe or space prefix, your choice of levels.
- Before and after A preview of changes and a CSV report that cannot itself trigger a formula.
- Real CSV parsing Quoted and multi-line cells, four delimiters, BOM and encoding handling.
Applications
Use Cases
- Checking a customer or order export before opening it in Excel
- Cleaning a CSV that will be sent to colleagues or an accountant
- Testing whether your application's CSV export escapes user input
- Finding out why a spreadsheet shows #NAME? or a security prompt for a CSV
- Producing a report of risky cells for a security review
Good to Know
Limitations
This looks only at how a spreadsheet may interpret the first character of each cell. It does not judge what a formula would do and is not an antivirus. Excel, LibreOffice and Google Sheets differ in which prefixes they treat as formulas and in what they show, and a new prefix could appear in the future. The apostrophe or space protection changes cell values; formulas you intend to keep must be left out of cleaning.
It does not remove other kinds of risky content such as very long text, links inside text cells that are not formulas, or macros in other file types. At most 50,000 flagged cells are listed and changed per file.
This tool runs entirely in your browser — your file is never uploaded to our servers. See our Privacy Policy for full details.
Support
Frequently Asked Questions
What is CSV formula injection?
A cell whose text starts with =, +, - or @ (or a tab or carriage return) can be evaluated as a formula when the CSV is opened in a spreadsheet program. If the text came from an untrusted user, it can pull in outside data, show a prompt or, in older setups, start a program.
Is my CSV uploaded?
No. It is read and rewritten in your browser and is not sent to our server or elsewhere.
Why are plain negative numbers listed as low?
They start with a minus sign but spreadsheets read them as numbers, not formulas, so they are not risky. They are shown so you can see everything that starts with those characters, and are not changed unless you choose to.
Why does Excel show the apostrophe?
In a CSV file there is no cell type, so the apostrophe is ordinary text and stays visible. It still stops the formula. A space is invisible but is also part of the value. Pick the one that suits your readers.
Does it handle quoted values and multi-line cells?
Yes. It follows RFC 4180: quoted fields, doubled quotes and line breaks inside quotes are read correctly, and only the flagged cells are rewritten.
Is this an antivirus?
No. It is a defensive utility for one specific risk, the first character of cells. It does not scan for malware.
Keep Going
Related Tools
- camt.053 Viewer & Excel/CSV Converter Open a camt.053 (or camt.052 / camt.054) bank statement XML, read balances and transactions in a table and export to Excel or CSV. Runs in your browser; the statement is not uploaded.
- Office Document Inspector & Metadata Remover Remove metadata from Word, Excel and PowerPoint files: see author names, comments, tracked-change authors, hidden sheets and speaker notes first, then clean a copy. In your browser.
- Office Embedded Object & Macro Risk Scanner Inspect a Word, Excel or PowerPoint file for VBA macros, ActiveX, OLE objects, embedded files, external links and templates, with severity and plain explanations. A structural scan, not an antivirus. In your browser.
- Send-Safe Document Checker Before you send a confidential PDF, Word, Excel or PowerPoint file: one overview of hidden information such as metadata, comments, tracked changes, hidden sheets, notes, attachments, scripts and macros, and which tool to use next. In your browser.