Export FortiGate firewall policies to CSV or Excel.
A practical workflow for reviewing FortiGate policy data in a spreadsheet and turning approved changes back into structured configuration.
FortiGate can export firewall-policy data to structured formats such as CSV or JSON on supported FortiOS versions. CSV is useful when you need to review a large rulebase in Excel, sort policies, document a change, or prepare policy data for another workflow.
How to export firewall policies from FortiGate
- Sign in to the FortiGate administrative interface.
- Open Policy & Objects → Firewall Policy.
- Choose the export option in the policy-list toolbar.
- Select CSV when you want to review the data in Excel, or JSON when that format better fits your automation workflow.
- Open the CSV in a spreadsheet application and verify that delimiters, encoding and multi-value fields are interpreted correctly.
What you can review in the exported policy list
Interfaces and direction
Check the incoming and outgoing interfaces for each rule and confirm that the policy belongs in the intended traffic path.
Source, destination and service
Look for overly broad objects, ANY values, legacy services and unexpected networks.
Action, NAT and profiles
Review accept/deny behavior, NAT state and the security-profile columns exposed by the particular export.
CSV export vs configuration backup
A CSV export is optimized for tabular review. A FortiOS configuration backup is better when you need to understand object definitions, custom-service definitions, occupied policy IDs and other configuration context. DeepCodeAgent currently accepts a firewall matrix as XLSX/CSV and can optionally compare it with a supported plain-text FortiOS configuration backup.
Want to go the other direction: Excel to FortiGate CLI?
If your spreadsheet describes a requested change rather than an existing rulebase, use the DeepCodeAgent matrix workflow to validate rows before creating FortiGate address objects, services and firewall-policy CLI.
Audit a firewall matrix and generate FortiGate CLI
Upload an XLSX/CSV matrix, review validation findings and generate FortiGate CLI locally in your browser.