# XSS Payload Samples

Educational collection of cross-site scripting (XSS) payloads for security testing and validation

> Canonical page: https://test.elysiatools.com/en/samples/xss-payloads

- **Category:** Security

- **Keywords:** xss, cross-site scripting, security, web security, payloads, injection, penetration testing

## Examples

- **Script Tag XSS Injections**: Various script tag based cross-site scripting payloads - basic scripts, external sources, case variations, and obfuscation techniques
- **Event Handler XSS Injections**: Event handler based XSS payloads - onerror, onload, onclick, onmouseover, onfocus, and other DOM events
- **Protocol XSS Injections**: JavaScript protocol based XSS - javascript:, data:, vbscript:, and other protocol injections
- **Encoded XSS Payloads**: XSS payloads using various encoding techniques - URL encoding, HTML entities, Unicode, Base64, and mixed encoding
- **DOM-based XSS Payloads**: DOM-based XSS vectors that manipulate the DOM - innerHTML, outerHTML, eval, setTimeout, createElement, and location manipulation

## Related tools

- [XSS Payload Detector](https://test.elysiatools.com/en/tools/xss-payload-detector): Detect XSS (Cross-Site Scripting) attack vectors in input strings
- [Web Push RFC 8030 Request + VAPID + RFC 8291 Payload Encryption Encoder](https://test.elysiatools.com/en/tools/web-push-rfc8030-vapid-rfc8291-payload-encrypted-content-encoder): Encode a complete Web Push send: RFC 8291 aes128gcm payload encryption, RFC 8292 VAPID ES256 JWT, RFC 8030 headers, APNs/FCM cross-walk and decrypt round-trip verification.
- [SQL Injection Detector](https://test.elysiatools.com/en/tools/sql-injection-detector): Detect common SQL injection attack patterns in input strings
- [AES Encryption Tool](https://test.elysiatools.com/en/tools/aes-encryption-tool): Encrypt or decrypt text and files with AES-256-GCM and export IV-based bundles
- [CSV/JSON Data Watermarker](https://test.elysiatools.com/en/tools/csv-json-data-watermarker): Inject visible or signature-style watermark fields into CSV or JSON exports so shared datasets can be traced later
- [JWT Generator](https://test.elysiatools.com/en/tools/jwt-generator): Generate JWT tokens with custom claims and algorithms
- [PDF Prompt Injection Scanner](https://test.elysiatools.com/en/tools/pdf-prompt-injection-scanner): Compare safe and unsafe PDF extraction runs to detect hidden text, off-page content, tiny text, and hidden-layer prompt injection risks
- [Secure Random Generator](https://test.elysiatools.com/en/tools/secure-random-generator): Generate cryptographically secure random key material driven by entropy budget — request N bits of entropy, get hex/base64/base64url output. Also supports custom-alphabet strings via crypto.randomInt (rejection-sampled, no modulo bias). Use this instead of Math.random()-based tools for any secret/key/token.

## Related content

- [SQL Injection Samples](https://test.elysiatools.com/en/samples/sql-injections): Educational collection of SQL injection payloads for security testing, vulnerability assessment, and defensive coding practices
- [JWT Samples](https://test.elysiatools.com/en/samples/jwt-samples): Comprehensive JWT examples from basic token structure to advanced security implementations
- [Git Branch Name Samples](https://test.elysiatools.com/en/samples/git-branch-names): Collection of Git branch names for validation testing, including valid patterns, invalid formats, and real-world examples
- [Log Files with Sensitive Data](https://test.elysiatools.com/en/samples/log-with-sensitive-data): Sample log files containing various types of PII (Personally Identifiable Information) for testing PII detection and log redaction tools
- [Hardhat Development Framework Samples](https://test.elysiatools.com/en/samples/hardhat-samples): Hardhat Ethereum development environment examples including smart contracts, testing, deployment, scripts, plugins, and development workflows
- [Jest Testing Framework](https://test.elysiatools.com/en/samples/jest-testing): Comprehensive Jest testing examples including unit tests, integration tests, mocking, async testing, and advanced patterns for JavaScript/TypeScript applications
