Excel Formula Sanitizer
Scan and sanitize dangerous formula injection triggers (=, +, -, @) in Excel and CSV files online. Configurable quote prefixing, trigger stripping, and before/after preview.
How to use Excel Formula Sanitizer
Protect your spreadsheets, database exports, and downstream application users against Formula Injection (also known as CSV Injection or CWE-1236). When untrusted text fields (such as user comments, customer names, or form submissions) begin with '=', '+', '-', or '@', spreadsheet applications like Microsoft Excel and LibreOffice Calc may execute them as active formulas or Dynamic Data Exchange (DDE) commands. Our sanitizer scans every cell in your .xlsx or CSV file, highlights potential injection triggers in an interactive preview table, and allows you to neutralize threats using configurable sanitization policies. All processing happens 100% in your browser memory — your data is never uploaded to external servers.
- Upload your Excel workbook (.xlsx) or delimited CSV file into the dropzone.
- Select your target worksheet if your workbook contains multiple tabs.
- Choose your sanitization mode: 'Prepend Single Quote' (recommended for safe Excel display), 'Strip Leading Symbols' (removes trigger characters), 'Prepend Space', or 'Scan / Audit Only'.
- Keep 'Preserve Numeric Values' checked so standard negative and positive numbers (e.g. -45.00) are not mistakenly flagged.
- Review the flagged cells summary and inspect the Before/After comparison table.
- Click 'Download Sanitized File' to save your secure spreadsheet as .xlsx or .csv.
Lexical Token Scanning & Formula Neutralization
The engine traverses the 2D cell grid, evaluating cell values against OWASP formula injection vectors (/^[=+\-@\t\r]/). Numerical primitives and signed decimals are differentiated from malicious strings. Flagged cells are sanitized according to the chosen policy (apostrophe prefixing, trigger excision, or space padding) and compiled back into standard OpenXML or RFC 4180 output.
- Sanitization protects downstream viewers of CSV and spreadsheet exports; it does not scan compiled VBA binary macro streams (VBAProject.bin).
- Always educate spreadsheet users never to enable external data connections or DDE links when prompted by desktop spreadsheet software.
All spreadsheet operations are processed entirely inside your local web browser. Your workbooks, tables, and confidential records are never sent to external servers or cloud services.
What is Formula Injection (CWE-1236)?
Formula Injection occurs when spreadsheets open untrusted text beginning with characters that spreadsheet engines interpret as formulas ('=', '+', '-', '@'). Attackers exploit this to execute external system commands via DDE or leak confidential cell data to remote servers when a user opens an exported CSV or Excel file.
Why does prepending an apostrophe (') fix the problem?
In Microsoft Excel, Google Sheets, and LibreOffice Calc, a leading apostrophe indicates that the cell must be treated strictly as plain text. The application displays the string without the apostrophe in the cell grid and completely disables formula parsing and macro execution.
Does this tool modify legitimate spreadsheet calculations?
If you have an Excel workbook with legitimate mathematical formulas (like '=SUM(B2:B10)'), you can choose whether to preserve genuine calculations or sanitize all formula prefixes. Genuine numeric values (such as negative financial figures) are automatically recognized and protected from alteration.
Are files sent to an external server?
No. 100% of the lexical parsing, regex evaluation, and file rewriting runs in your local browser memory. Zero bytes of your spreadsheets are transmitted across the web.