XSS Payload Encoder

Encode and decode XSS payloads for authorized security testing.

Last reviewed: April 2026

New to this tool? Click here for instructions

For Authorized Security Testing Only Use this tool only on systems you own or have explicit written permission to test. Unauthorized XSS testing is illegal under the Computer Fraud and Abuse Act (CFAA) and equivalent laws worldwide.
Input Payload
Test Payloads (click to load):
Encoded Results
Enter a payload on the left to see all encodings.
Enter a payload to encode.

How to use the XSS Payload Encoder

To use the XSS Payload Encoder, follow these steps:

1. Select a test payload from the quick-load chips or type your own payload in the input area.

2. Choose Encode or Decode using the mode chips above the input.

3. Review all encodings - the tool produces HTML entity, URL, Base64, Unicode escape, hex escape, and double-encoded variants simultaneously.

4. Copy individual encodings using the Copy button on each row, then test them in your authorized target application.

When to use the XSS Payload Encoder in real workflows

Use the XSS Payload Encoder only on systems you own or have explicit written permission to test. Unauthorized XSS testing is illegal under the Computer Fraud and Abuse Act (CFAA) and equivalent laws worldwide.

How the XSS Payload Encoder works

The tool produces HTML entity, URL, Base64, Unicode escape, hex escape, and double-encoded variants simultaneously. It is 100% client-side, meaning it does not require any server-side processing.

Tips, edge cases, and limitations

A well-implemented application should reject or neutralize all of these variants. If one encoding slips through, it indicates the application is only checking for specific patterns rather than performing proper context-aware output encoding.

Frequently Asked Questions

XSS is a type of web application security vulnerability that allows an attacker to inject malicious script into a user's browser.
Encoding XSS payloads helps to test whether an application's input sanitization is complete and can prevent XSS attacks.
Double encoding applies URL encoding twice, which can help bypass string-matching filters in vulnerable applications.
Yes, but only for authorized security testing. Unauthorized XSS testing is illegal under the Computer Fraud and Abuse Act (CFAA) and equivalent laws worldwide.
The gold standard for XSS prevention is to encode output at render time, not just validate input. This ensures that what constitutes 'valid' depends entirely on the context where the data will be used.