A privacy-focused, client-side web application for converting YouTube URLs to embed format with a terminal-inspired interface.
The xsukax YouTube to Embed URL Converter is a lightweight, standalone web application designed to transform standard YouTube video URLs into their embeddable counterparts. Built with a minimalist terminal aesthetic, this tool processes URLs entirely within the user's browser, ensuring complete privacy and eliminating the need for external servers or services.
The application supports multiple YouTube URL formats and provides both single and batch conversion capabilities, making it suitable for content creators, web developers, and anyone who needs to embed YouTube videos efficiently while maintaining full control over their data.
- Zero Server Communication: All URL processing occurs locally in your browser
- No Data Transmission: Your URLs never leave your device or browser
- Offline Functionality: Works without internet connection once initially loaded
- No External Dependencies: Uses only native browser APIs and vanilla JavaScript
- No Tracking: No analytics, cookies, or user tracking mechanisms
- No Third-Party Services: Does not communicate with external APIs or services
- No Data Storage: Does not store URLs in localStorage, sessionStorage, or any persistent storage
- No User Identification: Cannot identify or profile users in any way
- Input Validation: Robust regex patterns prevent malicious input processing
- XSS Protection: All user input is properly sanitized before display
- CSP Compatibility: Designed to work with strict Content Security Policies
- No Eval Usage: No dynamic code execution or eval() functions
- Multi-Format Support: Handles all common YouTube URL formats including:
- Standard watch URLs (
youtube.com/watch?v=) - Short URLs (
youtu.be/) - Embed URLs (
youtube.com/embed/) - Mobile URLs (
m.youtube.com/watch) - Shorts URLs (
youtube.com/shorts/) - Live stream URLs (
youtube.com/live/)
- Standard watch URLs (
- Terminal-Inspired Interface: Clean, developer-friendly design with monospace fonts
- Batch Processing: Convert multiple URLs simultaneously
- One-Click Copy: Built-in clipboard functionality for converted URLs
- Live Preview: Embedded iframe preview of converted videos
- Mobile Responsive: Optimized for both desktop and mobile devices
- Test Mode: Pre-loaded sample URLs for testing functionality
- Zero Dependencies: Pure HTML, CSS, and JavaScript implementation
- Lightweight: Minimal resource footprint
- Fast Processing: Instant URL conversion using efficient regex patterns
- Error Handling: Comprehensive validation and user-friendly error messages
- Cross-Browser Compatibility: Works across all modern browsers
-
Download or clone the repository:
git clone https://github.com/xsukax/xsukax-Youtube-to-Embed-URL.git cd xsukax-Youtube-to-Embed-URL -
Open
youtube_converter_enhanced.htmlin your preferred web browser
- Upload the HTML file to your web server
- Access via your domain:
https://yourdomain.com/youtube_converter_enhanced.html
- Navigate to the project directory
- Start a local server:
# Python 3 python -m http.server 8000 # Python 2 python -m SimpleHTTPServer 8000 # Node.js (if http-server is installed) npx http-server
- Open
http://localhost:8000in your browser
- Modern web browser with JavaScript enabled
- No additional software or dependencies required
- Works on Windows, macOS, Linux, iOS, and Android
flowchart TD
A[Input YouTube URL] --> B{Single or Batch?}
B -->|Single| C[Paste URL in Single Input]
B -->|Batch| D[Paste Multiple URLs in Batch Input]
C --> E[Click Convert Single URL]
D --> F[Click Convert All URLs]
E --> G[URL Processing]
F --> G
G --> H{Valid YouTube URL?}
H -->|Yes| I[Extract Video ID]
H -->|No| J[Display Error Message]
I --> K[Generate Embed URL]
K --> L[Display Results]
L --> M{User Action}
M -->|Copy URL| N[Copy to Clipboard]
M -->|Show Embed| O[Display Video Preview]
M -->|Clear All| P[Reset Application]
- Input: Paste a YouTube URL in the "Single URL Conversion" field
- Convert: Click the "Convert" button
- Result: View the converted embed URL in the output section
- Actions:
- Click "Copy" to copy the embed URL to clipboard
- Click "Embed" to preview the video
- Input: Paste multiple YouTube URLs (one per line) in the "Batch Conversion" textarea
- Convert: Click "Convert All URLs" button
- Results: Review conversion statistics and individual results
- Actions: Use individual copy/embed buttons for each converted URL
The application supports these YouTube URL formats:
Standard: https://www.youtube.com/watch?v=VIDEO_ID
Short: https://youtu.be/VIDEO_ID
Embed: https://www.youtube.com/embed/VIDEO_ID
Mobile: https://m.youtube.com/watch?v=VIDEO_ID
Shorts: https://www.youtube.com/shorts/VIDEO_ID
Live: https://www.youtube.com/live/VIDEO_ID
With params: https://www.youtube.com/watch?v=VIDEO_ID&t=30s
All formats convert to: https://www.youtube.com/embed/VIDEO_ID
graph LR
A[User Input] --> B[URL Validation]
B --> C[Regex Pattern Matching]
C --> D[Video ID Extraction]
D --> E[Embed URL Generation]
E --> F[Result Display]
B -->|Invalid| G[Error Handling]
G --> H[User Notification]
F --> I[Copy Function]
F --> J[Embed Preview]
subgraph "Client Browser Only"
B
C
D
E
F
G
end
The application provides clear feedback for common issues:
- Invalid URLs: Displays specific error messages for unrecognized formats
- Empty Input: Prompts user to provide input before conversion
- Network Issues: Embed previews may fail if YouTube blocks the request
- Browser Compatibility: Graceful fallback for older clipboard API support
- Click "Load Test URLs" to populate the batch input with sample URLs
- Useful for testing functionality and understanding supported formats
- Ctrl+A (in textarea): Select all URLs for easy replacement
- Ctrl+C: Copy selected text
- Ctrl+V: Paste URLs into input fields
| Issue | Solution |
|---|---|
| Video won't embed | Check if video allows embedding (some are restricted) |
| Copy function not working | Ensure browser supports modern clipboard API |
| Interface appears broken | Enable JavaScript in browser settings |
| URLs not converting | Verify URL format matches supported patterns |
- Chrome/Edge: Full functionality
- Firefox: Full functionality
- Safari: Full functionality (may require user gesture for clipboard)
- Mobile browsers: Responsive design with full functionality
We welcome contributions to improve the xsukax YouTube to Embed URL Converter:
- Fork the repository
- Create a feature branch (
git checkout -b feature/improvement) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/improvement) - Create a Pull Request
- Maintain the privacy-first approach (no external dependencies)
- Follow the existing code style and structure
- Test across multiple browsers before submitting
- Update documentation for new features
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
- Freedom to use: Run the program for any purpose
- Freedom to study: Access and modify source code
- Freedom to distribute: Share copies with others
- Freedom to improve: Distribute modified versions
The GPL v3.0 ensures this tool remains free and open-source, protecting user privacy and preventing proprietary restrictions on this privacy-focused application.
Developed with privacy and user freedom in mind | Report Issues | View Source