Show HN: Fenced – Markdown to self-contained HTML with decorated code blocks

lars-dev1 pts0 comments

fenced · decorated code blocks, real HTML, no screenshots

mode

terminal<br>themed<br>plain

syntax

copy html<br>❯ download .html

markdown.md

upload<br>sample

preview

what it is

Markdown to self-contained HTML, decorated and real.

fenced is a free, browser-based converter that turns Markdown into clean, self-contained HTML. Every fenced code block is rendered as a decorated window with proper syntax highlighting, and the result stays real, selectable HTML you can copy, host, or paste anywhere. No screenshots, no image exports, no account.

Screenshots of code go stale the moment you edit, cannot be copied, ignore dark mode, and read poorly on a phone. fenced keeps your code as text and just dresses it up, so it stays accessible to readers, screen readers, and search engines.

how it works

Three ways to dress a fence.

Paste or drop a Markdown file, pick a look, then copy the HTML or download a single self-contained file. Every code block resolves to one of three modes:

Terminal. A window with traffic-light chrome and a language label, the signature look.

Themed. A clean syntax-highlighted card with line numbers.

Plain. Minimal chrome, no highlighting, just the code.

Highlighting is powered by Shiki, with the four Catppuccin flavors plus GitHub, One Dark Pro, Nord, Dracula, Tokyo Night, and more. Tokens ship as inline styles, so an exported file needs no stylesheet, just the markup.

where it fits

Built for blogs, docs, and email.

Because the output is portable HTML with inline styles, a fenced block drops cleanly into a blog post, a CMS like Ghost or WordPress, static-site documentation, or even an email newsletter, where most highlighted-code tools fall apart. Copy a single block, or convert a whole document at once.

faq

Questions, answers.

Does fenced upload my Markdown or code?<br>No. Everything runs in your browser. Parsing and syntax highlighting happen on your device, and nothing is ever uploaded or sent to a server.

How is fenced different from a code screenshot tool like Carbon or ray.so?<br>Those tools export an image. fenced outputs real, selectable HTML, so readers can copy your code, it stays sharp on any screen, and it remains readable by screen readers and search engines. No screenshots.

Is the exported HTML self-contained?<br>Yes. Syntax colors are inlined on each token and the styles are bundled into the file, so a downloaded .html works anywhere with no external stylesheet. You can also lift a single decorated code block into a CMS or an email.

Can I use the output in an email newsletter?<br>Yes. Because the syntax colors are inline styles, the decorated code blocks render in email clients that strip external CSS, which most highlighted-code tools cannot do.

Which languages and themes are supported?<br>Highlighting is powered by Shiki, with languages including TypeScript, Python, Rust, Go, and many more, and themes including all four Catppuccin flavors plus GitHub, One Dark Pro, Nord, Dracula, Tokyo Night, and others.

Is fenced free and open source?<br>Yes. fenced is free and MIT licensed, and the source is available on GitHub.

code html fenced markdown decorated syntax

Related Articles