Free online tools

Markdown Code Fence Generator

Prepare a code block that can safely contain examples of Markdown fences or other source text.

Enter your values

This tool processes your input in your browser.

Result

Choose a fence long enough for your sample

CommonMark uses at least three matching backticks or tildes. A longer opening fence can contain shorter runs of the same character without closing the code block.

Add a syntax-highlighting hint

The optional info string uses a single language identifier such as json or python. The display system decides how that language is highlighted.

Frequently asked questions

Will the code be executed?

The result is ordinary Markdown text. The tool does not execute the content or preview it as a live program.