文件格式任意转换助手Transfer Any File

离线 · 无上传 · 浏览器本地完成Offline · no uploads · runs in the browser

JPG 转 Markdown——离线、内联图片、不做 OCRJPG to Markdown offline — an inline image, no OCR

两步,而且第二步几乎不做决定:`jpg>html` 先把文件的原始字节编成 data URI 放进一个 `<img>`(`alt` 与 `title` 都是你的文件名主干,去扩展名、无名时 `converted`,并做属性转义),`html>md` 再用 Turndown 把这份文档序列化。实测产物就是形如 `![合同扫描件](data:image/jpeg;base64,/9j/… "合同扫描件")` 的**一行图片语法**:那张 `<img>` 是页面 `body` 里唯一的元素,所以除这一行之外没有别的正文;样式表在 `<head>`,而序列化只取 `body`,CSS 不会漏进 Markdown。base64 负载整个写进 `.md`——每三个字节四个字符,另加图片语法本身那一点开销——所以文件自包含、拷走单个 `.md` 不必带附件目录。要说清的一条边界:**这不是「图片转文字」**。图里印着什么,这条链一概不知道——它不读像素,本扩展也不带 OCR 模型与语言包,更不会把图上传给谁去识别。想要能搜索、能复制的文字得靠识别工具:在本地跑的那种与这里无关,要把图传上去的那种则意味着文件出了本机。反过来,如果你的目的就是把一张图塞进一份 Markdown 笔记,并且希望它在本机打开、或在自己的编辑器预览里始终带图,那这一路正是为此形状做的;在别人家的托管站上显不显示,由那边怎么处理 `data:` 图片地址决定,这里不能替你保证。全程只有 storage 权限,不联网。Two steps, and the second barely makes decisions: `jpg>html` first encodes the file’s raw bytes into a data URI inside an `<img>` (`alt` and `title` both carry the basename of your file, extension dropped, `converted` when there is no usable name, escaped for attribute position), and `html>md` then serialises that document with Turndown. Measured, the artifact is **one line of image syntax** looking like `![合同扫描件](data:image/jpeg;base64,/9j/… "合同扫描件")`: that `<img>` is the only element in the page’s body, so nothing else is in the way, and the stylesheet sits in `<head>` while the serialisation reads only the body, so no CSS leaks in. The base64 payload is written straight into the `.md` — four characters per three bytes, plus the image syntax itself — so the file is self-contained and a single `.md` travels without an attachments folder. The boundary stated plainly: **this is not “image to text”**. Whatever is printed in the picture is unknown to this chain — it never reads pixels, the extension ships no OCR model or language packs, and it uploads nothing anywhere. Searchable, copyable words need a recognition tool: one that runs locally has nothing to do with this route, one that takes the picture over the network means the file has left your machine. If instead your goal is to put one picture inside a Markdown note and have it render on your own machine or in your own editor’s preview, this is exactly that shape; whether some hosting site draws a `data:` picture depends on how it handles those addresses, which no page here can promise for it. All of it on the storage permission, with no network at all.

一批转换结果卡片,含文件名、体积与下载入口
一次混合批量,一个 ZIP 下载One mixed batch, one ZIP download

这条链路怎么走How the route runs

JPEGJPEG HTMLHTML MarkdownMarkdown

共 2 步,由扩展的路径搜索自动选出,中间产物不落盘。2 steps, chosen by the extension's own path search; intermediate results never touch the disk.

会保留什么What carries over

  • 自包含的一行图片语法:base64 写在 `.md` 里,拷走笔记不用带附件目录One self-contained image tag: the base64 lives in the `.md`, so the note travels without an attachments folder
  • 字节是原文件的字节:这条链不重编码,所以没有第二代损失The bytes are your file’s bytes: no re-encoding on this chain, so no second-generation loss
  • `alt` 与 `title` 带你的文件名主干,可继续编辑成有意义的描述`alt` and `title` carry your file’s basename, ready for you to edit into something meaningful
  • 样式表不会漏进产物:那一步只取文档 `body`,head 里的 CSS 不参与No stylesheet leaks: the serialisation reads the document body only, leaving the head’s CSS out
  • 一批最多 200 个文件、单个 100 MB,与其他路线共用同一道闸门Up to 200 files per batch and 100 MB each — the same gate every other route shares

如实说明的限制What it does not do

  • 不做 OCR:图里印着的文字不会变成 Markdown 文字,这条路连像素都不读No OCR: text printed in the picture never becomes Markdown text, because this route never reads pixels
  • 体积只增不减:base64 每三字节四字符,整段负载还挤在同一行里——这是内联换来的代价The file only grows: base64 is four characters per three bytes and the whole payload sits on that one line — the price of inlining
  • 一行一文件:只包一张图,多张请分别转换,或自己写成标准外链图片语法One picture per file: convert separately, or write a normal external image reference for several
  • 不会替你写 `alt` 文案:产物里的描述来自文件名,语义得由你补It will not write your `alt` copy: the description comes from the file name and the meaning is yours to add
  • 想要「文字在仓库里、图在目录里」那种可 diff 的形状,这条路相反——它把图搬进了文本If you want words versioned in the repository and pictures in a folder — the diffable shape — this route does the opposite: it moves the image into the text
  • `data:` 图片能不能显示由收件端决定:网页端邮件客户端与一些托管站会剥掉它,那种场合请用外链图片Whether a `data:` picture displays is up to whatever receives it: webmail clients and some hosting sites strip it, so use an external reference in those cases

实操提示Working with it

  • 只想把图放进网页:JPG→HTML 就是这条的第一步,产物是 HTML 而不是 `.md`To put the picture in a web page: JPG to HTML is this route’s first step, and the artifact is HTML rather than `.md`
  • 要文字版的图片内容:这需要 OCR,本扩展离线且不带模型,请自行用识别工具再把文字贴进 MarkdownFor a text version of what the picture says: that needs OCR, which this offline extension does not ship — run a recognition tool yourself and paste its words into Markdown
  • 要 Word 里的图片:JPG→Word 第一步同为 `jpg>html`,那条 data URI 在进 Word 时换成包里的图片部件,`.docx` 里不留 data URIFor a picture inside a Word file: JPG to Word shares this first step, and that data URI becomes an image part inside the package — none is left in the `.docx`

常见问题Questions people actually ask

为什么我的 `.md` 突然变这么大?Why did my .md suddenly get so big?

因为图片是内联的:base64 每三字节省四字符(约 4/3),整张图的字节都写进了文本文件。想要小一点的写法是外链——把图放在目录里、在 Markdown 里写 `![说明](图片.jpg)`;这条路只做内联,因为它保证拷走单个 `.md` 也还能显示。Because the picture is inlined: base64 turns every three bytes into four characters (about 4/3), so the whole image sits inside a text file. The smaller alternative is an external reference — keep the picture in a folder and write `![caption](image.jpg)`; this route only inlines, which is what makes a single `.md` enough to still render.

它能把我拍的文档照片转成可编辑文字吗?Can it turn a photo of my document into editable text?

不能,这一点页面上每条都写明:这条链产出的是图片语法那一行,不读像素,也不上传去问别的引擎——本扩展不携带 OCR 模型或语言包,所以这件事它刻意不做。要文字得另找识别工具:在本地跑的那种与这里无关,要把图传上去的那种就不再是「文件不出本机」。No — every page in this family says so plainly: the route produces an image tag, never reads pixels, and uploads nothing to some other engine; the extension ships no OCR model or language packs, so it deliberately does not do this. Text needs a separate recognition tool: one running locally has nothing to do with this route, and one that receives your picture ends “the file never leaves this machine”.

产物长什么样,能给个例子吗?What does the artifact look like — an example?

一行:`![文件名主干](data:…;base64,一长串 "文件名主干")`。`alt` 与 `title` 都来自你的文件名(去掉扩展名;没有可用名字时是 `converted`),中间是那台文件完整的 base64 负载。实测产物就这一行——上一步的 `body` 里只有那张 `<img>`,所以没有别的正文被序列化下来。One line: `![basename](data:…;base64,a-long-run "basename")`. `alt` and `title` both come from your file name (extension dropped; `converted` when there is no usable name), and between the parentheses is the file’s full base64 payload. Measured, that single line is the whole artifact — the previous step’s body holds nothing but that `<img>`, so there is no other prose left to serialise.

不需要账号,也不需要联网:装好扩展后点图标,在新标签页里打开工作台,文件从磁盘直接选。No account and no network: install the extension, click its icon, and the workbench opens in a new tab reading straight off your disk.