HTML Live Preview
A scratchpad for HTML, CSS, and JavaScript. Preview updates instantly. Share via URL.
How to use it
- 1Type HTML, CSS, or JavaScript in the editor on the left.
- 2The preview on the right updates as you type.
- 3Click Share to copy a URL that contains your entire snippet.
Common use cases
- Prototype a UI component before integrating it into a larger project.
- Reproduce a CSS or layout bug and share it with a teammate.
- Test a third-party script in isolation before adding it to production.
- Demonstrate a snippet during a code review or technical interview.
Frequently asked questions
- Is my code saved if I close the tab?
- Yes. Your snippet is stored in your browser's localStorage, so the next visit restores it automatically.
- How does the Share link work?
- Your HTML, CSS, and JS are encoded into the URL's hash fragment. Anyone with the link sees the same code, but nothing is stored on a server.
- Can I import npm packages?
- No. The preview runs vanilla JavaScript only. You can use any CDN-hosted library by adding a <script> tag in your HTML.
- Is the preview sandboxed?
- Yes. It runs inside an iframe with restricted permissions, so it can't access your cookies, localStorage, or anything outside the preview itself.
Related tools
Base64 Encode / Decode
Encode and decode text and files to and from Base64.
JSON Formatter
Format, validate, minify, diff, and explore JSON — with optional on-device AI that summarizes any payload in plain English.
JWT Decoder
Inspect the header, payload, and expiry of any JSON Web Token — with optional on-device AI that explains what the token grants in plain English.
SQL Formatter
Beautify, format, and minify SQL queries for any dialect — with optional on-device AI that explains what a query does in plain English.
Unix Timestamp Converter
Convert Unix timestamps to dates and back, in any timezone.
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes in your browser.
JSON to TypeScript
Generate TypeScript interfaces or type aliases from JSON.
Markdown to PDF
Convert Markdown to a beautifully styled PDF in your browser.
QR Code Generator
Make QR codes for websites, Wi-Fi passwords, contact cards, social handles, email, SMS, and more. Download as PNG or SVG — or as a ZIP with one branded QR per social platform.
Password Generator
Generate strong, secure passwords in your browser. Nothing is sent or saved to any server.
Text Diff
Compare two pieces of text and see line-by-line, word-by-word, or character-by-character what changed.
UUID / ULID Generator
Generate UUID v4, UUID v7, or ULID identifiers in bulk, instantly in your browser.
SVG to PNG / JPEG / WebP
Convert SVG to PNG, JPEG, or WebP at any size — quality slider, transparent or colored background, copy to clipboard. Free, in your browser.
URL Encoder / Decoder
Encode or decode URLs and query parameters with component-vs-full-URI scope, plus a query-string breakdown. Free, in your browser.
Regex Tester
Test JavaScript regular expressions with live highlighting and a capture-group inspector — plus an AI regex generator that turns plain-English descriptions into regex (on-device Gemini Nano).
Color Converter
Convert colors between HEX, RGB, HSL, HSV, and OKLCH, and generate tint, shade, and harmony palettes. Free, in your browser.
HTML ↔ Markdown Converter
Convert HTML to Markdown or Markdown to HTML with a live preview. GFM tables, fenced code blocks, inline formatting. Free, in your browser.
Cron Builder
Build cron expressions visually or describe the schedule in plain English and let on-device AI write it for you. Plain-English explanation, next 5 runs, presets.