HTML Editor
Write HTML with live preview side-by-side. Syntax-highlighted editor with formatted source view — useful for testing snippets, email templates, or quick mockups in your browser.
How to use the html editor
Edit HTML on the left; the preview on the right updates live. The preview runs in a sandboxed iframe — scripts in your code do not access this page.
Formula & explanation
We use an srcdoc iframe with sandbox='allow-scripts' so your code is isolated from the parent.
Examples
Prototype a snippet of HTML, see how a form behaves, or test inline CSS quickly.
Frequently asked questions
- Can I include external CSS or JS?
- Yes — include them via <link> and <script src> tags. They load in the iframe just like a normal page.
Related developer tools tools
- HTML Entities EncoderEncode text to HTML entities and decode entities back to text. Converts angle brackets, ampersands, quotes, and other special characters to safe equivalents for use in HTML templates and CMS workflows.
- Markdown PreviewLive markdown editor with GitHub-flavored rendering. Supports tables, code blocks, task lists, and strikethrough. Great for drafting README files or documentation.
- Regex TesterTest JavaScript regular expressions live with instant match highlighting. Supports all JS regex flags (g, i, m, s, u) and shows match groups, indices, and global matches.
- XML FormatterFormat, indent, and validate XML documents. Detects malformed tags, unclosed elements, and bad attributes with clear line-level error messages. Great for config and API work.
- SQL FormatterPretty-print and format SQL for any major dialect — MySQL, PostgreSQL, SQLite, T-SQL, and more. Normalizes indentation, keywords, and spacing for readable, consistent queries.
- Base64 Encoder/DecoderEncode text or binary data to Base64 and decode Base64 strings back to text. Supports standard and URL-safe Base64. Useful for data URIs, API tokens, and email attachments.