MD2IMG Local first · Free to use

Code to Image

Code mode accepts source directly and wraps it as a highlighted block. Choose the correct language, then adjust the theme, type size and canvas.

How to use it

  1. Paste code and select its language
  2. Adjust the theme, type size and background
  3. Check highlighting and export the image

Limitations

Highlighting uses the selected language. Unsupported identifiers are auto-detected; choosing the wrong supported language may produce inaccurate highlighting but never changes the source.

Input example

type ExportFormat = 'png' | 'webp' | 'svg'

function exportImage(format: ExportFormat) {
  return `Exporting ${format}`
}

中文