URL Decode filter plugin
Decodes URL-encoded (percent-encoded) values so escaped characters become readable text. Useful when upstream systems log encoded URLs or form data.
- Package:
logstash-filter-urldecode - Coverage source: default/bundled
- Official catalog entry: Yes
Plugin overview
urldecode is used in the Logstash filter stage. Decodes URL-encoded field values.
Typical use cases
- Tag failed operations and route them to dedicated troubleshooting views.
- Transform fields before indexing to keep schema and naming consistent.
Input and output behavior
- Flow: reads one or more configured fields, applies plugin logic, then updates event fields in place.
- Input field:
field(default:"message"). - Output: updates the current event in place unless configured otherwise.
- Important options:
field,tag_on_failure,all_fields,charset. - Failure signaling: uses
tag_on_failure(default:["_urldecodefailure"]) so failed events can be routed or inspected.
Options
Required
- No required plugin-specific options.
Optional
all_fields(type: boolean; default:false) — When true, decode every string field in the event.charset(type: string; default:"UTF-8") — Character set used when interpreting decoded bytes (for exampleUTF-8).field(type: string; default:"message") — Field to decode.tag_on_failure(type: array; default:["_urldecodefailure"]) — Tags applied when decoding fails.
Example configuration
filter {
urldecode {
field => "[url][query]"
charset => "UTF-8"
tag_on_failure => [ "_urldecodefailure" ]
}
}Common options configuration
All Logstash filter plugins support these shared options:
add_field(type: hash; default:{}) — Adds fields when the filter succeeds. Supports dynamic field names and values.add_tag(type: array; default:[]) — Adds one or more tags when the filter succeeds.enable_metric(type: boolean; default:true) — Enables or disables metric collection for this plugin instance.id(type: string; default:none) — Sets an explicit plugin instance ID for monitoring and troubleshooting.periodic_flush(type: boolean; default:false) — Calls the filter flush method at regular intervals.remove_field(type: array; default:[]) — Removes fields when the filter succeeds. Supports dynamic field names.remove_tag(type: array; default:[]) — Removes tags when the filter succeeds.
filter {
urldecode {
add_field => { "pipeline_stage" => "parsed" }
add_tag => ["parsed", "logstash_filter"]
enable_metric => true
id => "my_filter_instance"
periodic_flush => false
remove_field => ["tmp_field"]
remove_tag => ["temporary"]
}
}Apply in Logit.io
- Open your stack in Logit.io and navigate to Logstash Pipelines.
- In the
filter { ... }section, add aurldecodeblock. - Save your pipeline changes, then restart the Logstash pipeline if prompted.
- Send sample events and verify parsed/enriched fields in OpenSearch Dashboards.
Validation checklist
- Confirm the
urldecodeblock compiles without syntax errors. - Verify expected new/updated fields exist in sample documents.
- Verify unexpected fields are not removed unless explicitly configured.
- Confirm tags added on success/failure align with your alerting and routing rules.
Troubleshooting
- If events are unchanged, verify your filter condition (
if ...) matches incoming events. - If the pipeline fails to start, validate braces/quotes and retry with a minimal filter block.
- Check for
tag_on_failuretags (default:["_urldecodefailure"]) to quickly isolate parse/mutation failures. - If throughput drops, reduce expensive operations and test with representative sample volume.
References
- GitHub package:
logstash-filter-urldecode(opens in a new tab) - Canonical catalog: /log-management/ingestion-pipeline/logstash-filters-reference