Sigma to KQL Converter
Paste a Sigma detection rule and get a Microsoft
Sentinel / Defender KQL query back — instantly, right in your
browser. Nothing is uploaded: the conversion runs entirely client-side, so your rules never leave your
machine. It handles the common, high-frequency subset of the Sigma spec
(logsource → table mapping, field/value matching, modifiers, and condition logic including
1 of/all of quantifiers) and is
honest about its limits — anything it can't translate is flagged, never silently dropped.
// Suspicious Encoded PowerShell Command Line
// Sigma rule id: 6385697e-9f1b-40bd-8817-f4a91f40508e
// Severity: high
DeviceProcessEvents
| where ((FolderPath endswith "\\\\powershell.exe" and (ProcessCommandLine contains " -enc " or ProcessCommandLine contains " -encodedcommand " or ProcessCommandLine contains " -e ")) and not (ProcessCommandLine contains "Update-Help")) Converted to KQL, 0 warnings
What's supported
- logsource → KQL table mapping (process_creation, network_connection, dns, file_event, registry, image_load, etc.)
- Named selections + condition logic: and / or / not, parentheses
- "1 of selection*", "all of selection*", "1 of them", "all of them"
- Field equality, value lists (OR), and null checks
- Wildcards: *val → endswith, val* → startswith, *val* → contains, exact string → =~ (case-insensitive, matching Sigma), numeric → ==
- Modifiers: |contains |startswith |endswith |re |all |gt |gte |lt |lte |windash
- Field-name mapping Sigma → KQL (Image, CommandLine, ParentImage, etc.)
- |base64 / |base64offset — value is base64-encoded best-effort (offset variants are approximate)
- |cidr — translated to ipv4_is_in_range() (single CIDR only; verify ranges)
- Unmapped field names — passed through verbatim with a warning
- Unmapped logsource — falls back to a placeholder table with a warning
- Correlation rules (action: correlation) and rule collections
- Aggregation conditions (count() by ..., | near, timeframe)
- Placeholders (%placeholder%) and field-reference comparisons (|fieldref)
This converter is a starting point, not a substitute for review. Always validate field names and table mappings against your own schema before deploying a query to production. Looking for ready-made, reviewed detections? Browse the library.