Journey

Journey

Browse pathways

XSS Encoding Lab

Practice encoding untrusted data for the right output context. This is a conceptual drill - the goal is to build the habit of encoding to where data is used.

Output context

Pick the context where your untrusted value will be inserted.

Try including quotes, angle brackets, and event handlers.

HTML encoding is for text nodes. For JS/CSS contexts, use context-specific escaping and avoid string-building where possible.
Want a professional to look at it?Get an AppSec Health Check.