Explicode lets you write rich Markdown documentation directly inside your code comments, turning a single source file into both runnable code and beautifully rendered documentation.
Because the documentation lives inside comments, it doesnโt affect your program or build process. No special compilers, configuration, or tooling changes are required. Just write Markdown in your comments and keep coding. Keeping documentation in the same file as the code makes it far more likely to stay accurate and up to date, since it evolves alongside the implementation and is automatically versioned with your project in Git. Explicode brings the ideas of literate programming to modern development across many languages, without requiring language-specific documentation frameworks.

Use Markdown syntax inside the multiline comments of your favorite language:
In Python, Explicode looks for triple-quoted strings (""" or ''') that start at the beginning of a line (only whitespace before them). These are the same positions Python uses for docstrings, at the top of a module, class, or function. Triple-quotes used as regular string values mid-expression are ignored.
"""
This is a Markdown doc block โ triple-quote is at the start of the line.
"""
x = """this is NOT a doc block โ it's a string value assigned to a variable"""
For all other supported languages, Explicode renders any /* ... */ block comment as Markdown. JSDoc-style /** ... */ comments are also supported.
/*
This is a Markdown doc block.
*/
/** This too โ leading asterisks are stripped automatically. */
// Single-line comments are NOT rendered as Markdown, they stay as code.
Everything outside a doc block is rendered as a syntax-highlighted code block. Full CommonMark syntax is supported, including headings, lists, math with LaTeX syntax, images, tables, and more.
Open any supported file in VSCode, then either:
Ctrl+Alt+E (or Cmd+Alt+E on Mac), orThis opens a live preview panel to the right that updates as you edit.
The โ๏ธ button on the header enables some additional functionalities:
.md or .html."""
# Fibonacci Sequence
Generates the first `n` Fibonacci numbers iteratively.
- **Input**: `n` (int) โ how many numbers to generate
- **Output**: list of the first `n` Fibonacci numbers
"""
def fibonacci(n):
if n <= 0:
return []
elif n == 1:
return [0]
seq = [0, 1]
for _ in range(2, n):
seq.append(seq[-1] + seq[-2])
return seq
fibonacci(5) # [0, 1, 1, 2, 3]
/*
# Fibonacci Sequence
Generates the first `n` Fibonacci numbers iteratively.
- **Input**: `n` (int) โ how many numbers to generate
- **Output**: list of the first `n` Fibonacci numbers
*/
function fibonacci(n) {
if (n <= 0) return [];
if (n === 1) return [0];
const seq = [0, 1];
for (let i = 2; i < n; i++) {
seq.push(seq[i - 1] + seq[i - 2]);
}
return seq;
}
fibonacci(5); // [0, 1, 1, 2, 3]
Explicode currently supports:
Need support for another language? Open an issue or reach out.
Explicode keeps your documentation and code in the same place. By writing Markdown directly inside code comments, you can turn a single source file into both runnable code and clear, readable documentation. This makes documentation easier to maintain, keeps it versioned alongside your code, and helps others understand your work without needing separate documentation files or tools.
No. Explicode works directly with your existing source files. Simply write Markdown inside your code comments and open the preview. Thereโs no need for special file formats, configuration, or changes to your build system.
No. Explicode only reads your source file โ it never modifies it. Documentation lives inside standard language comments, so your compiler, interpreter, and build tools see exactly the same code they always did.
No. Explicode only reads your source file locally to generate the rendered preview. Your code is never uploaded or stored in any database.
Tools like JSDoc and Sphinx extract documentation from special comment annotations (for example @param or @returns) and generate API reference docs. Explicode takes a different approach: your comments are free-form Markdown prose, letting you write narrative documentation, tutorials, or literate-programming-style explanations โ not just API stubs. It also works across many languages without any language-specific toolchain.
Absolutely. Open an issue on GitHub with the language name and its block comment syntax. Languages that use /* ... */ style block comments are usually trivial to add.
Yes! The extension is free to install from the VS Code Marketplace. Check the repository for license details and source code.
Have a bug report, feature request, or collaboration idea?
Reach out at froem076@umn.edu.
Explicode ยท 2026