Online JavaScript Redirect
Generate JavaScript redirect code. Enter URL and optional delay to get window.location or meta refresh snippet.
window.location.href = "https://example.com";
<meta http-equiv="refresh" content="0; url=https://example.com">
Frequently Asked Questions
- When to use JavaScript redirect?
- For client-side redirects when you control the page. For SEO-friendly moves use server 301/302 instead.
- What is the delay for?
- Optional seconds before redirect (e.g. 5 for 'redirect in 5 seconds'). Zero means immediate.
- Does it work without JavaScript?
- No. If JS is disabled, the meta refresh option can still redirect after a delay in most browsers.
Related Developer Tools
JSON Formatter
Format, validate, and beautify JSON. Minify or pretty-print with one click.
Base64 Decode
Decode Base64 strings to text. Encode text to Base64.
UUID Generator
Generate random UUIDs (v4) for unique identifiers. Copy with one click.
URL Encoder Decoder
Encode and decode URLs. Convert special characters for safe use in URLs.
Convert Color Hex to RGB
Convert hex color codes to RGB values (R, G, B).
Convert Color RGB to Hex
Convert RGB values (R, G, B) to hex color codes.