Skip to content

Image to Markdown

Turn screenshots and photos of documents into structured Markdown on your device.

Drop screenshots or document photos here

Or paste a screenshot with Ctrl+V / ⌘V

How to use Image to Markdown

  1. Add or paste screenshots. Drop files onto Drop screenshots or document photos here to batch convert document photos to Markdown offline, click Choose images, or press Ctrl+V or Cmd+V from your clipboard.
  2. Configure layout options. Keep Detect tables and Detect headings and lists checked for slides and docs, or enable Wrap code snippets for terminal and editor captures.
  3. Review in Preview mode. Switch between Markdown and Preview in the Output view toggle to inspect reconstructed headings, lists, and table columns.
  4. Copy or download Markdown. Click Copy Markdown for clipboard transfer or Save .md to download a single file or combined images-to-markdown.md bundle.

Your files are processed on this device and never uploaded. They stay private, and there's nothing to delete afterwards.

When should you use Image to Markdown vs Image to text or PDF OCR?

Image to Markdown runs local Tesseract.js recognition with bounding-box output so layout rules can measure each word’s x-coordinate, baseline y-coordinate, and pixel height. Rather than emitting flat lines, the layout engine groups words into lines, compares line heights against the document median, and aligns multi-column runs into GitHub-Flavored Markdown.

Choose this converter when screenshots contain headings, bullet lists, or multi-column tables you want preserved as Markdown syntax. If you only need unformatted lines without # markers or table pipes, use plain-text image OCR without Markdown formatting instead, or use PDF OCR for multi-page scanned PDF documents.

Font-height ratios for ATX headings and list items

After sorting recognized words into horizontal lines, the layout pipeline calculates the median line height across the capture. Lines measuring at least 1.45 times the median height become top-level # headings, while lines at 1.15 times the median or above become ## subheadings.

Bullet glyphs, hyphens, and numbered prefixes at consistent left indents are normalized into standard Markdown lists. Leading #, >, +, -, and numbered list prefixes inside ordinary prose are escaped with a backslash so normal sentences do not accidentally render as headings or lists.

Three-row threshold for GitHub-Flavored Markdown tables

To build a table that conforms to the GitHub Flavored Markdown Tables Extension, the parser scans consecutive lines for aligned horizontal column gaps. A run converts into a pipe table with a header row and hyphen delimiter row only when at least 3 consecutive multi-column lines appear together.

In addition to the three-row minimum, the run must contain at least 3 columns or have an average cell length below 28 characters. This guard prevents two-column web articles or side-by-side slide captions from being misread as spreadsheet tables.

Pasting screenshots and tuning layout detection options

Screenshots enter the queue through drag-and-drop, the Choose images file picker, or direct clipboard pasting. Once queued, three checkboxes in the right-hand options panel control how the layout engine transforms the raw OCR word boxes into Markdown syntax.

When you finish extracting tabular data from a slide or dashboard, you can export Markdown pipe tables to paginated PDFs for clean printing.

Instant clipboard capture and supported image formats

A window listener on the MDN Web Docs Clipboard paste event reads clipboardData.files whenever you press Ctrl+V or Cmd+V outside an input box. Pasted PNG screenshots are automatically named Pasted screenshot <n>.png and decoded immediately in browser memory.

File inputs accept standard raster formats (PNG, JPG, WebP, GIF, BMP) alongside AVIF, TIFF, and HEIC/HEIF photos. All decoding and canvas drawing happen locally inside your tab with zero network uploads.

Detect tables, headings and lists, and Wrap code snippets

Each checkbox updates the generated Markdown immediately without re-running OCR, so you can toggle options freely after recognition finishes.

Control label Default state Effect on Markdown output Best input type
Detect tables Checked (true) Converts 3+ row multi-column runs into GFM pipe tables Pricing grids, spreadsheets, invoices
Detect headings and lists Checked (true) Maps large lines to #/## headings and normalizes bullets Slide decks, articles, reports
Wrap code snippets Unchecked (false) Wraps detected code runs in fenced triple-backtick blocks IDE screenshots, SQL queries, terminal logs
Output view Markdown Toggles between raw editable text and rendered HTML preview Checking table alignment and headings

When Wrap code snippets is checked, the detector looks for monospace tokens, common keywords (const, function, def, SELECT), trailing braces or semicolons, and indented continuation lines within 2.1 times the line height. Indentation is preserved up to 16 spaces based on pixel offset from the block’s left edge.

Why small screenshots are upscaled before recognition

Browser screenshots captured from high-density displays or cropped UI panels often contain 10 to 14 px text that causes raw OCR engines to drop punctuation or merge characters. To prevent missed letters, the canvas preprocessor enlarges narrow images up to 3x their original width before passing pixels to Tesseract.

If a slide or paper capture contains mathematical notation that OCR cannot parse cleanly, you can render LaTeX equations into PNG or SVG figures cleanly from source markup.

Canvas preparation up to 4000 px and 16.7 megapixels

Before OCR starts, prepareOcrCanvas uses the MDN Web Docs CanvasRenderingContext2D drawImage method to paint the image onto a solid #fff background with high smoothing quality. Any image narrower than 1,600 px is scaled up toward 1,600 px wide, capped at 3x magnification.

To stay safely inside WebKit and Chromium 2D canvas memory limits, scaling is strictly bounded so neither side exceeds 4,000 px and total area never exceeds 16,777,216 px. Filling a white background before drawing also ensures transparent PNG screenshots of dark-on-transparent text remain legible.

Word confidence filtering and low-contrast warnings

Tesseract returns a confidence score from 0 to 100 for every recognized word bounding box. Words scoring below 30 are discarded automatically so random background noise, icons, or borders do not pollute your Markdown output.

If the average word confidence for an image drops below 60, the card displays a low-contrast notice advising you to verify numbers and headings. Shooting straight-on in even lighting or taking a crisp native screenshot instead of a phone photo of a monitor raises confidence above that threshold.

Previewing, batching, and exporting clean Markdown

Every completed card shows either the raw Markdown source or a rendered preview, depending on your selection in the Output view toggle. You can copy an individual card’s output with its inline copy button or export the entire batch from the sidebar.

If you decide later that you only need plain paragraphs without # headings or pipe delimiters, you can strip Markdown syntax into clean plain text in one step.

Switching between Markdown source and rendered Preview

The Markdown view displays the generated text in a monospace read-only textarea ready for inspection or copying. Switching to Preview runs the output through the built-in Markdown AST parser to render headings, bold or italic runs, lists, fenced code blocks, and bordered HTML tables inside the card.

Visualizing tables in Preview helps catch merged cells or misaligned columns before pasting into GitHub, Notion, or a static site generator. Because headings follow the GitHub Flavored Markdown ATX Headings Specification, pasting into any CommonMark or GFM editor preserves hierarchy immediately.

Tip: Click Clear all when you finish a batch. Clearing the queue revokes preview object URLs and terminates the background Tesseract worker, releasing WASM memory in your browser tab immediately.

Single-file downloads vs combined multi-image exports

When you convert a single image, Save .md names the download after your original file stem (truncated safely to 80 characters) with a .md extension. If you queue two or more images, Copy all Markdown and Save .md combine every non-empty result into images-to-markdown.md.

Multi-image exports separate each capture with an HTML comment containing the source filename (<!-- slide-2.png -->) followed by a --- thematic break. That convention keeps slide decks and multi-page screenshot batches organized in a single Markdown document.

Questions

How does Image to Markdown differ from plain-text OCR?

Plain-text OCR returns flat lines without structural hierarchy. Image to Markdown inspects word bounding-box coordinates and font-height ratios to rebuild ATX headings, bullet lists, and aligned pipe tables.

Can I paste a screenshot directly from my clipboard?

Yes. Pressing Ctrl+V on Windows and Linux or Cmd+V on Mac anywhere outside a text field reads image files straight from your clipboard without saving a temporary file first.

Why does the tool upscale small screenshots before reading?

Images narrower than 1,600 pixels are enlarged up to 3x on a white canvas before recognition. Higher pixel height gives the OCR engine cleaner glyph boundaries on small UI fonts and table cells.

Why did a two-row table convert as plain paragraphs?

The table detector requires at least three consecutive multi-column lines with three or more columns or short cell averages under 28 characters. Two-row grids are kept as prose to avoid false tables on two-column layouts.

What happens when I convert multiple images at once?

Each image runs sequentially in the local OCR queue and renders its own card. When you click Copy all Markdown or Save .md, outputs are joined with HTML filename comments and horizontal dividers.

Can Image to Markdown extract math equations or handwritten notes?

Handwritten notes and complex mathematical notation have lower accuracy because the local English Tesseract model targets printed and typed text. For clean math typesetting, render source expressions with a LaTeX equation tool instead of OCR.

Which languages and image formats does this tool read?

The local Tesseract worker loads the English language model and reads PNG, JPG, WebP, AVIF, GIF, BMP, TIFF, and HEIC or HEIF files. Handwritten notes and stylized display fonts have lower accuracy than printed text.

Updated