FOFA Query Builder
Build a FOFA search from fields (domain, title, header, cert, icon_hash, port and more) with =, ==, != and wildcard operators.
Runs in your browser Your input never leaves your device.
Authorised use only. This tool writes a search query; it does not touch any target. Run it for your own assets or for work you have permission to do.
Report a problem with this tool
About this tool
FOFA queries look like domain="example.com" && title=="Login": a field, an operator and a quoted value, joined with && (and) or || (or). The operators matter: = matches loosely, == requires an exact match, != excludes and *= accepts wildcards. This tool lets you pick the field and operator from lists, type the value, and builds the query with the quotes and escapes in the right places (a quote or backslash inside the value is escaped). Choose whether all rows must match (AND) or any of them (OR). Values are checked where the form is known: ports are numbers, countries are two letters, icon_hash is a whole number (negative values are normal; you can get one from the favicon hash calculator on this site). The link opens FOFA with the query already filled in, encoded the way FOFA expects. Starter queries cover checks of your own domain and organisation. FOFA decides what each field returns and what your account may see, so some queries need a signed-in or paid account. Search engines index what is already public, so a query is not an attack, but use it only for your own assets or for work you are authorised to do. The query is built in your browser; nothing is sent until you open the link.
How to use it
- Pick a starter query or add a field.
- Choose the field, the operator and type the value.
- Pick AND or OR when you have several rows.
- Copy the query or open it in FOFA.
Example
Values are always quoted; rows are joined with &&.
domain = example.com title == Login
domain="example.com" && title=="Login"
Common problems
- FOFA shows no results or asks me to sign in
- Many queries need a FOFA account, and limits depend on the plan. Try fewer fields.
- = and == give different results
- = is a loose match and == an exact one. Use == when you want the whole value.
- My value contains a quote
- It is escaped for you. If FOFA still rejects it, simplify the text.