Skip to main content
Preparing workspace

Prompt Painter

Paste HTML in the Monaco editor and a sandboxed iframe renders it as you type, with Tailwind preloaded. Mobile 375×667, tablet 768×1024, 50–200% zoom.

Still loading. If the tool doesn’t appear, reload this page.

About this tool

Prompt Painter

HTML Live Preview with Tailwind CSS and interactive code editing.

Prompt Painter is a split-screen HTML playground: you type markup in a Monaco code editor on the left and a sandboxed iframe on the right re-renders it instantly with the Tailwind CSS CDN already loaded, so utility classes like bg-blue-500 and hover:scale-105 work without any build step. It is built for developers and designers checking a snippet of AI-generated or hand-written HTML, and it includes device presets, zoom, and a js-beautify formatter. Nothing is compiled or uploaded — the preview runs from a srcdoc iframe in your own tab.

How to use Prompt Painter

  1. Type or paste your markup into the Monaco editor on the left — the preview wrapper already injects the Tailwind CDN, so utility classes work on a bare snippet.

  2. Switch the preview between Desktop View (Full Width), Tablet View (768px) and Mobile View (375px), and use Zoom In / Zoom Out between 50% and 200%.

  3. Press Format (or Cmd/Ctrl+S) to reindent with js-beautify at 2 spaces, then Copy to take the code away; Clear empties the buffer.

Why use Prompt Painter

  • Tailwind works out of the box

    The preview document injects the Tailwind CDN and a config block, so utility classes render without you setting up a project.

  • Real device frames, not guesses

    Mobile (375x667), tablet (768x1024) and full-width desktop modes with a portrait/landscape flip, plus 50%-200% zoom.

  • Editor shortcuts that match the toolbar

    Cmd/Ctrl+S formats with js-beautify, Cmd/Ctrl+K clears the buffer, and Cmd/Ctrl+Shift+C copies the current code.

Common use cases

  • An LLM hands you a block of Tailwind HTML for a pricing card and you want to see what it actually renders as before pasting it into your component file.
  • You are checking whether a hero section survives a narrow screen, so you flip the preview to the 375x667 iPhone frame and then the 768x1024 tablet frame instead of resizing your whole browser window.
  • A colleague pastes minified or badly indented HTML into chat and you need it readable, so you drop it in and hit the format button to get 2-space indented markup back.

Frequently asked questions

Do I need to add the Tailwind CDN script to my HTML?

No — the preview wrapper already injects the Tailwind CDN and a small tailwind.config block before your markup, so utility classes work on a bare snippet. You can still include your own <style> or <script> tags and they will run alongside it.

Link to answer
What screen sizes does the preview simulate?

Three: mobile at 375x667, tablet at 768x1024, and desktop at the full width of the panel. Mobile and tablet also have a rotate control that swaps the dimensions to 667x375 and 1024x768 for landscape.

Link to answer
Does JavaScript in my HTML actually run?

Yes. The preview iframe is loaded with the allow-scripts sandbox permission, so inline handlers such as onclick and <script> blocks execute, which is how the sample document's toggle button works.

Link to answer
How does the format button change my code?

It runs js-beautify's HTML formatter with 2-space indentation, preserved newlines capped at 2 consecutive blank lines, and a trailing newline at the end of the file. It only reindents markup — it does not rewrite tags or classes.

Link to answer