mdgate converters

SVG to Markdown in your browser.

Convert SVG files to GitHub-Flavored Markdown directly in your browser.

Your SVG stays on your device. No upload. No account.

Starting local converter

Use SVG to Markdown in your app

$ npm install @mdgate/image

import { toMarkdown } from '@mdgate/image';

const markdown = await toMarkdown(bytes);

Pure TypeScript, Node.js, Cloudflare Workers, Edge, Browser, No Python, No native addons, No WASM, Zero third-party runtime dependencies

How SVG to Markdown works

  1. SVG
  2. image detection
  3. SVG text · your vision callback
  4. GitHub-Flavored Markdown

Built for JavaScript runtimes

Node.js

Read local files, uploads, S3/R2 objects, and other byte sources.

Cloudflare Workers

Detect images inside Workers. SVG converts locally. Raster images use the callback you register.

Browser

Convert SVG locally. Raster images need a vision callback in your application.

Edge

Run the same TypeScript converter in compatible Edge runtimes.

What @mdgate/image extracts

  • SVG / SVGZ titles and visible text
  • JPEG, PNG, WebP, GIF, TIFF, HEIC, and BMP via your callback

SVG vs Raster image

SVG

SVG text → @mdgate/image → Markdown

Raster image

JPEG / PNG / … → your vision pipeline

@mdgate/image does not silently send images to an OCR or AI service.

Why @mdgate/image

Runs where your JavaScript runs

No separate processing service. The converter is TypeScript you can call from Node.js, Cloudflare Workers, Edge runtimes, and browsers.

Local conversion

SVG files can stay inside your application or browser.

Content detection

Recognizes SVG files from their contents, not only the filename.

Deterministic parsing

The same SVG file produces repeatable Markdown without model inference.

Small runtime surface

No Python. No native addons. No WASM. No third-party runtime dependencies.

SVG for AI agents

Turn SVG files into content your agent can actually work with.

  1. SVG
  2. Markdown
    • grep
    • search
    • chunk
    • index
    • cache
    • cite
    • reason

Need more than SVG?

One format

@mdgate/image

Your own set

@mdgate/core
+ @mdgate/image
+ @mdgate/pdf
+ @mdgate/docx

Broad file support

@mdgate/converters

FAQ

Can I convert SVG to Markdown without uploading it?

Yes. SVG files can be converted locally in the browser.

Does SVG to Markdown work in Cloudflare Workers?

Yes. @mdgate/image runs directly in Cloudflare Workers.

Does it require Python?

No.

Does it require native addons or WASM?

No.

What does it output?

GitHub-Flavored Markdown.

Can I install only the SVG converter?

Yes. Install @mdgate/image instead of the complete converter set.

Does it OCR scanned images?

Not by itself. Raster formats need a vision callback you provide. SVG converts locally.