Back to portfolioVaibhav Goel

Markdown previewer

Type Markdown, see it rendered live. The parser is written from scratch and outputs React elements, so pasted HTML can never execute.

  • React
  • Custom parser
  • XSS-safe rendering

Preview

Markdown previewer

Type on the left, see it rendered on the right.

What it handles

  • Bold and italic text
  • inline code and links like my portfolio
  • Ordered lists:
  1. Parse the source line by line
  2. Split block elements from inline ones
  3. Render React elements, never raw HTML
Rendering to React elements instead of an HTML string means pasted <script> tags show up as text. That is the whole point.
const safe = true;

Try editing this text.

89 words · 517 characters · parsed with no third-party library