DevTools Logo

Nmap Command Builder

Nmap Command Builder

Compose an nmap scan from targets, technique, ports, timing and outputs — with per-flag explanations and a duration hint.

Runs in your browserNo scanning from this page
Authorized targets only. Build commands for systems you own or have written permission to test. This tool only produces text — it never connects to a target.
Try an example

Scan options

no targets · default
TargetsShow

Single IPs, CIDR (prefix 8–32), dash ranges, hostnames or comma lists.

TechniqueShow
Scan technique
PortsShow
Port selection mode
TimingShow

Templates trade speed against accuracy and noise. T3 is nmap's default.

Timing template
Detection & scriptsShow
Extras & pacingShow
Output filesShow
More flags (59)

Command preview

Not ready

Enter a target to build a command

Everything is composed in this browser tab — nothing is scanned.

Examples

LAN inventory sweep

Input
Targets: 192.168.1.0/24 · Technique: SYN · Ports: top 1000 · Timing: T4
Output
nmap -sS --top-ports 1000 -T4 192.168.1.0/24

A fast, focused sweep of common ports on a local subnet. The heuristic lands in the 30 seconds–3 minutes band.

UDP audit with bounded retries

Input
Targets: 10.0.0.5 · Technique: UDP · Ports: 53,123,161 · Max retries: 2
Output
nmap -sU -p 53,123,161 --max-retries 2 10.0.0.5

Explicit UDP ports avoid guessing; the retry limit keeps a noisy network from stalling the scan.

Machine-readable inventory

Input
Targets: 10.0.0.0/24 · Technique: connect · Output: all formats, base scan_results
Output
nmap -sT -oA scan_results 10.0.0.0/24

-oA writes .nmap, .gnmap and .xml files with one base name — convenient for a scheduled audit.

About this tool

Nmap Command Builder turns a scan plan into an exact, copy-pasteable nmap command line. Choose targets, a scan technique, port selection, a timing template and output formats; the preview assembles them in a canonical order and explains every flag it uses. It is built for people who know what they want to scan but not which combination of switches expresses it.

Validation happens as you type. IPv4 addresses and CIDR prefixes are checked against their real bounds (8–32), dash ranges and hostnames are accepted, ports must be between 1 and 65535, and output file names are reduced to a safe basename. An optional IPv6 mode switches target validation to textual IPv6 addresses. Every explanation links to the matching section of the official Nmap reference guide.

The duration chip is a deliberately coarse heuristic, not a promise: it scales with host count, port count, technique, timing template and content-heavy options such as version detection or NSE. Nothing is sent anywhere and no scan is run — the page only writes text. Authorized targets only.

What this tool does not do

  • This tool generates text only — it never sends packets, resolves targets or executes nmap.
  • Duration estimates are broad bands derived from a simple model, not measurements of your network.
  • The bundled flag catalogue is a paraphrase of the Nmap reference guide and may lag newer nmap releases; verify with nmap --help.
  • Port and target validation checks syntax, not whether an address is reachable or authorized to scan.
  • Only boolean switches can be added from the extended flag picker; flags with free-form values are exposed through their dedicated fields.

How to use this tool

  1. Enter your targets

    Type IPs, a CIDR block, a dash range, hostnames or a comma-separated list. Invalid tokens are called out immediately and keep the command disabled.

  2. Choose the scan shape

    Pick a technique (connect, SYN, UDP or ping-only), a port mode, and a timing template. Add version detection, scripts, pacing and extras as needed.

  3. Read the rationale

    The explanation list shows what each generated flag does, why it matters, and where it appears in the Nmap reference guide.

  4. Copy the command

    Copy the finished command (or press Ctrl/Cmd+Shift+Enter) and run it yourself in an authorized environment. The URL state is shareable.

Use cases

Internal asset inventory

Sweep a known subnet with a SYN scan and top ports, then export XML for a configuration-management pipeline.

Learning nmap flags

Toggle -sS, -sV or -T4 one at a time and read the matching man-page explanation without memorising a cheat sheet.

Repeatable CI audits

Compose a deterministic command with --max-rate and --max-retries, copy it into a job, and keep the flag rationale alongside it.

Scan options at a glance

OptionEffect
-sT / -sS / -sU / -snConnect, SYN, UDP or discovery-only scan; SYN and UDP need elevated privileges.
Default / list / range / --top-ports / -p-Controls how many ports are probed, from 1,000 default ports to all 65,535.
-T0 … -T5Timing templates from paranoid to insane; T3 is nmap's default and is omitted from the command.
-sV / --version-light / -sC / --scriptService version detection and NSE scripts; these add time but produce richer results.
-oN / -oG / -oX / -oANormal text, grepable, XML, or all three from one sanitized base file name.
-6Switches target validation to IPv6 and adds the -6 flag to the command.

Flags are emitted in a readable canonical order; nmap accepts most flag orders, so the command is safe to edit by hand afterwards.

Common mistakes

Mistake:Using -sS or -sU without elevated privileges.

Fix:Enable the sudo prefix, or switch to connect scan (-sT). Raw-packet modes need root or Administrator on most systems.

Mistake:Expecting -A to be equivalent to its individual switches in the command text.

Fix:-A already implies -sV, -sC, -O and --traceroute. The builder emits -A alone, so implied flags are never duplicated; unchecking a visual toggle cannot disable them while -A is on.

Mistake:Treating the duration chip as a guarantee.

Fix:It is a coarse heuristic based on scan shape. Latency, packet loss, target behaviour and rate limits can change real runtime dramatically.

Mistake:Running a ping-only scan and wondering why ports are missing.

Fix:Host discovery (-sn) ignores ports, versions and scripts; those options are dropped from the generated command with a notice.

Frequently asked questions

What is the difference between -sS and -sT?

-sT uses the operating system's connect call and completes the TCP handshake, so it works without elevated privileges but is recorded by the target service. -sS sends raw SYN packets and never completes the handshake, which is faster and quieter in application logs; raw packet sockets normally require root or Administrator. On IPv6, raw-packet techniques still need elevated privileges.

Which timing template (-T) should I use?

Start with T3, nmap's default. T4 is aggressive: excellent on a local network but noisy and less reliable across a WAN. T5 trades accuracy for speed and is best reserved for quick experiments. T0–T2 slow probes down to reduce load or detection risk. T3 is implicit in the generated command, so you will not see it printed.

Does -sS need root/admin rights?

Yes on most systems: SYN and UDP scans rely on raw packets. Enable the sudo prefix in the builder to make the copied command runnable as root, or switch to the connect scan (-sT) when you cannot elevate. OS detection (-O) and -A have the same requirement.

What does -Pn do and when is it required?

-Pn disables host discovery and treats every supplied address as up. It is needed when firewalls drop ICMP echo and the usual TCP/UDP discovery probes, because otherwise nmap would skip hosts that are actually online. The trade-off is time: you may scan addresses that no longer exist.

How long will my scan take?

The duration chip is a coarse heuristic, not a measurement. It grows with the number of addresses and ports, is slower for UDP and faster with aggressive timing, and increases for version detection, NSE scripts and extra retries. Latency, packet loss, rate limits and target behaviour often matter more than the flags themselves.

Does this tool scan anything or send my targets anywhere?

No. It is a text builder: validation, assembly and explanations all run in your browser tab. No packets are sent, no target list is uploaded, and nothing is stored on a server. Use the generated command only against systems you own or have permission to test.

References & standards