snaptxt.app

HTML Live Preview

A scratchpad for HTML, CSS, and JavaScript. Preview updates instantly. Share via URL.

How to use it

  1. 1Type HTML, CSS, or JavaScript in the editor on the left.
  2. 2The preview on the right updates as you type.
  3. 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.