Drag & Drop File Upload Demo - Online With Preview
Drop files onto a zone and see a preview with name, size, and type. Copy the JavaScript pattern for your site.
UD5 Toolkit
Test onload / onerror events in real-time with precise timing.
onload event fires when an image has been successfully downloaded and decoded by the browser. At this point, the image's naturalWidth and naturalHeight properties are available, and the image can be rendered to a canvas or displayed in the DOM. This event is crucial for triggering actions that depend on the image being fully available, such as starting animations, updating UI states, or measuring image dimensions for responsive layouts.
onerror event triggers when the browser fails to load the image. Common causes include: 404 Not Found (the URL points to a non-existent resource), DNS resolution failure (the domain doesn't exist), network errors (timeouts, connection refused), invalid image data (the server returned a non-image response with a 200 status), CORS issues (when using cross-origin images in canvas), and server errors (5xx status codes). Always implement an onerror handler to provide fallback images or graceful degradation in production applications.
Image object strictly validates the response: if the MIME type isn't an image format (like image/png, image/jpeg, image/webp, image/svg+xml), or if the binary data is corrupted, onerror fires. This is a common pitfall when debugging image loading issues. Use this tool to test URLs and see exactly which event fires.
performance.now() or Date.now() to capture timestamps before setting the image src and inside the onload callback. The difference gives you the exact loading duration in milliseconds. This tool automates that process — every test shows the precise load time. For production monitoring, consider using the Resource Timing API (performance.getEntriesByType('resource')) which provides detailed network timing breakdowns including DNS, TCP, TLS, and TTFB for each image.
<img> tags and trigger onload normally — CORS does not block basic image display. However, if you try to draw a cross-origin image onto a <canvas> without the crossorigin="anonymous" attribute and proper CORS headers on the server, the canvas becomes tainted and you cannot call toDataURL() or getImageData(). The image onload event still fires, but subsequent canvas operations will throw a security error. Always set img.crossOrigin = 'anonymous' before setting src if you plan to use canvas operations.
loading="lazy" attribute on <img> tags, the browser defers loading until the image approaches the viewport. The onload and onerror events do not fire until the image actually starts loading. If an image never enters the viewport, these events may never trigger. When testing with JavaScript new Image() (as this tool does), lazy loading is not applicable — the image begins loading immediately upon setting src, which gives you the most direct way to debug load events. Keep this distinction in mind when debugging lazy-loaded images in your application.
Drop files onto a zone and see a preview with name, size, and type. Copy the JavaScript pattern for your site.
Enter a URL and get a list of all images that fail to load (404, CORS). A simple asset audit tool. Runs in your browser.
Enter a URL and see its favicon at all standard sizes. Check if it's properly defined. SEO basic check.
See how to implement file upload progress using both fetch and XHR. Real‑time bar and code snippets for your project.
Pick a color palette and the tool shows sample images that match it. Great for moodboard and brand inspiration. Static dataset.
Paste your email subject and body. The tool highlights common spam trigger words and gives a risk score. Improve inbox placement.
See how your browser renders emojis from different Unicode versions. Detect gaps in your system's emoji font support.
Start a fetch request and cancel it with AbortController. See how to implement request cancellation. Interactive.
Enter an emoji or browse to see which Unicode version introduced it and whether older OS versions might fail.
View every standard emoji in a searchable grid. Hover to see a larger preview. Click to copy. Updated with Unicode 16.
Convert between emoji characters and their shortcode representations (e.g., :tada: to 🎉). Supports Slack and GitHub styles.
Select a heading font and get recommended body font pairings. Live preview with sample text. Copy the CSS import links.
Paste a list of words or lines and convert all to UPPERCASE or lowercase at once. Also supports title case.
Paste HTML code and extract all comments or remove them completely. See a list of comments found. Clean your markup.
Transform regular text into the mocking SpongeBob‑style alternating case. Copy and paste for hilarious effect.
Convert running shoe sizes between US (men/women), UK, EU, and centimeters. Also includes brand-specific fit notes (general guide).
Generate a printable pace band for ultra distances with mile/km splits and cumulative time. Adjust for terrain.
Quiz yourself on element symbols, names, and atomic numbers. Multiple modes: element to symbol, symbol to element. Score tracking. Great for chemistry students.
Upload an image and see its 2D FFT magnitude and phase. Learn how image filtering works. Educatinal tool. Canvas.
Predict the file size of an image based on pixel dimensions and format (JPEG, PNG, WebP). Rough estimate. Local.
Paste an image from your clipboard directly into the page (Ctrl+V) and extract its color palette. No file dialog needed.
Enter the URL of any image and receive a random harmonious palette extracted from it. Click to regen. For quick inspiration.
Upload any image and view it as a person with deuteranopia, protanopia, or tritanopia would. Promote inclusive design.
Paste HTML/CSS snippets or enter properties to test how z‑index and stacking contexts interact. Real‑time example.
Apply a precise rounded corner effect to an image by cropping with a mask. Download as transparent PNG. All local.
Drop an image that might have wrong extension and see its real format (JPEG, PNG, WebP) based on header bytes.
Upload a small pixel art image and get a CSS grid layout that recreates it using divs. Novelty developer tool.
A new random cat photo every day from a curated set of pics. Click to refresh. Bright and adorable.
Resize and crop an image to a specific aspect ratio (1:1, 16:9…) with automatic fit/cover. Download the perfect image.
Enter an image URL and extract its dominant color palette. No download needed. Fast visual analysis.