ToolJovia
Files

Markdown Code Block Bundle Exporter

Extract actual Markdown code blocks into a safe-name local ZIP with original source-line evidence.

✓ Browser-local processing
Files are read locally and are not uploaded.

Loading tool…

How to use Markdown Code Block Bundle Exporter

Recover examples from original Markdown files without copying fences, accidentally treating inline code as a program, or trusting filenames in an info string. The tool collects actual CommonMark block tokens, keeps both normalized code content and exact original full-line slices, and creates a usable bundle of inert .txt members plus an evidence manifest. No selected code or HTML is run, rendered or fetched.

  1. Choose one to five actual UTF-8 Markdown files, or load the original local example file.
  2. Choose all code blocks, fenced blocks or indented blocks and run the bounded extraction.
  3. Review the language/info strings, normalized content and exact source-line evidence; download the ZIP and inspect its .txt members before reusing any code.

Good to know

  • At most five files, 200,000 aggregate bytes, 50,000 UTF-16 source code units and 5,000 physical lines. Strict UTF-8 and well-formed Unicode are required; literal NUL is refused. One leading BOM is ignored only for parsing and remains in original source-line slices. File names are manifest text, never archive paths.
  • Pinned CommonMark parsing uses Markdown-it 15.0.3 without plugins, MDX compilation or GitHub-specific extensions. Inline code spans and HTML pre/code elements are not extracted as code blocks. Fence language/info strings are evidence text and never interpreted as filenames, executable types or commands.
  • Code content follows parser normalization: LF line endings and a canonical trailing LF for nonempty content. It is not a byte-for-byte extraction of original code indentation or line endings. Exact full source-line slices retain original line endings, BOM when included, list/quote prefixes and fence text. Line numbers are one-based and inclusive; original UTF-16 offsets are zero-based and end-exclusive.
  • The native module Worker has a separate 10-second parser-startup cap and a 2-second computation cap, then terminates. At most 10,000 aggregate tokens, 40 levels and 200 code blocks are accepted. Excessive source is refused without a partial bundle. A current native Worker and a working local download are required.
  • All modes share the same source-order extraction workflow. The ZIP contains generated block-NNN.txt files and manifest.json, even when no blocks match. The manifest retains original code-source slices and file names; it is not an anonymization or credential-removal tool. Archive text is capped at 2,000,000 UTF-8 bytes and the readable report at 1,000,000 characters.
  • Processing is local. Output is limited to 1,000,000 text characters unless a stricter file limit is stated.

Common questions

Will a fenced shell command or HTML example run when I extract it?

No. The parser recognizes Markdown structure only. Every extracted block becomes text in the report and a generated .txt ZIP member; source HTML is never mounted, and no command, URL, import or info string is executed.

Is this input sent to a server?

No. The application processes this input inside your browser tab and does not save it to persistent storage.

Keep going with related tools

All files →