SHA‑1, SHA‑256, SHA‑512 Hash Generator - Online
Generate SHA‑1, SHA‑256, SHA‑512, and SHA‑3 digests of any text or file. Verify integrity. All in your browser.
UD5 Toolkit
typeof & instanceof SandboxTest any JavaScript expression and instantly see its typeof result and instanceof inheritance chain. Understand the quirks of JavaScript types in a live sandbox.
| Constructor | Result |
|---|
Only built‑in constructors available in your browser are shown.
typeof is a unary operator that returns a string indicating the primitive type of its operand. It can distinguish between 'undefined', 'boolean', 'number', 'string', 'symbol', 'function', and 'object'. However, it has known limitations (e.g., typeof null returns 'object', and it cannot differentiate an array from a plain object).
null was 000, which coincided with the tag for objects. The behavior was kept for backward compatibility. To reliably check for null, use value === null.
typeof [] returns "object". To properly detect arrays, use Array.isArray(value) or value instanceof Array, both of which are much more reliable.
typeof [] === 'object' but [] instanceof Array is true.
instanceof requires an object on the left side. Primitives like numbers, strings, or booleans will always return false (e.g., 42 instanceof Number is false). However, primitives are temporarily wrapped in objects when you access methods, but instanceof sees the primitive.
Array.isArray(value). Alternatively, you can use value instanceof Array, but it may fail across different execution contexts (e.g., iframes). Our sandbox shows both methods.
NaN (Not‑a‑Number) is technically a numeric value according to the IEEE 754 floating‑point standard. JavaScript follows this specification. To check if a value is NaN, use Number.isNaN(value) or isNaN(value), though the latter coerces the argument.
typeof x === 'undefined'. This is the only safe way to check if a variable is declared but not defined, because accessing an undeclared variable throws a ReferenceError, while typeof never throws.
false. null and undefined are not objects, so they cannot be on the left side of instanceof (technically, the instanceof operator first coerces the left operand to an object, but the internal check fails for these values and returns false).
typeof cannot distinguish between different object subtypes such as Array, Date, RegExp, Map, or custom classes; all return "object". For those, you need instanceof or other specialized methods like Array.isArray().
Generate SHA‑1, SHA‑256, SHA‑512, and SHA‑3 digests of any text or file. Verify integrity. All in your browser.
Pick colors for the shadcn/ui design system and generate the complete CSS variable theme file. Copy into your project.
Write Mermaid syntax inside Markdown blocks and instantly see rendered flowcharts, sequence diagrams, and Gantt charts. Copy SVG.
Experiment with JavaScript Intl.DateTimeFormat options. Choose locale, dateStyle, timeStyle, hour12 and see live output. Copy the code snippet for your project.
Write a JavaScript snippet and get a ready‑to‑drag bookmarklet link. With minification and encoding. Easy browser tools.
Drop a PDF and extract any embedded JavaScript or form actions. Check for malicious code. Privacy‑friendly analysis.
Paste JavaScript and catch syntax errors instantly with line numbers. Lightweight pre‑commit check. Local.
A textarea that expands in height as you type. See the implementation and copy the code. No library needed.
Create errors with the cause option and see chained error objects. Learn error wrapping for better debugging.
Explore all Intl APIs: NumberFormat, DateTimeFormat, RelativeTimeFormat, ListFormat. See outputs for any locale. Powerful i18n.
Create and dispatch custom events with detail. Listen on other elements. Understand pub/sub pattern in vanilla JS.
Watch a simulation of how the JavaScript event loop handles synchronous code, microtasks, and macrotasks. Learn async.
Create promises that resolve or reject after a delay. See state changes and chain .then/.catch. Debug async code.
Write a generator function and step through it with next(). See values and done state. Understand iterators.
Apply a Proxy to an object and see the get/set traps log fired in real time. Understand metaprogramming. Local.
Write JavaScript using element.animate() and see the result in a live preview. Compare with CSS keyframes. Debugger included.
See every HTML input type in one page. Check browser support and styling. Copy sample markup. Quick frontend reference.
Display used/total/limit JS heap size using performance.memory. Take snapshots and see growth. Simple memory leak detection.
Write to shared storage and run a worklet to process data. Learn the privacy‑preserving alternative to third‑party cookies.
Input any JavaScript object and see if structuredClone can deep‑copy it. Compare with JSON.parse/stringify. Learn transferables.
Test the Fullscreen API: request fullscreen on a colored div, detect changes, and copy the JavaScript boilerplate.
Choose Babel presets (env, React, TypeScript) and plugins. Get a clean babel.config.json to transpile your code. Local tool.
Press any key to see the complete KeyboardEvent properties: key, code, keyCode, modifiers. Indispensable for game & shortcut developers.
Write JavaScript code and see the output or console.log results immediately. Safe iframe sandbox. For quick experiments.
Type raw HTML and see the escaped version, then see how it renders when unescaped. Understand encoding better.
Build an iframe with different sandbox flags and see live which features are blocked. For secure embedding.
Paste any JavaScript snippet and get a ready‑to‑drag bookmarklet link. Minify and encode automatically. Pure client.
Convert any text into JavaScript‑style \uXXXX escape sequences and vice versa. Handles emojis. Useful for i18n development.
Type any condition and see the result of the ternary operator. Understand truthy/falsy values. Quick learning tool.
Press any key to see the corresponding JavaScript event key, code, and keyCode. An essential debugging tool for front-end developers handling keyboard input.