<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Owen Builds]]></title><description><![CDATA[Owen Builds]]></description><link>https://owenbuilds.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Tue, 03 Nov 2026 22:39:39 GMT</lastBuildDate><atom:link href="https://owenbuilds.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Converting PDF, Word and Web Pages to Markdown: Pandoc, Copy-Paste and Browser Tools Compared]]></title><description><![CDATA[A lot of my work ends up in Markdown: READMEs, docs sites, personal notes, and more and more often, text I paste into an LLM as context. The problem is…]]></description><link>https://owenbuilds.hashnode.dev/converting-pdf-word-and-web-pages-to-markdown-pandoc-copy-paste-and-browser-tools-compared</link><guid isPermaLink="true">https://owenbuilds.hashnode.dev/converting-pdf-word-and-web-pages-to-markdown-pandoc-copy-paste-and-browser-tools-compared</guid><category><![CDATA[markdown]]></category><category><![CDATA[Productivity]]></category><category><![CDATA[webdev]]></category><category><![CDATA[tools]]></category><dc:creator><![CDATA[Owen]]></dc:creator><pubDate>Wed, 28 Oct 2026 13:35:53 GMT</pubDate><content:encoded><![CDATA[<p>A lot of my work ends up in Markdown: READMEs, docs sites, personal notes, and more and more often, text I paste into an LLM as context. The problem is that the source material almost never starts as Markdown. It arrives as a PDF spec, a Word document from a client, or a long web page I want to keep.</p>
<p>I'm Owen, an indie developer in Ho Chi Minh City. After converting documents by hand one too many times, I built a small browser converter for it. Before I get to that, here is an honest look at the options I've used, because the right one depends on what you're converting and how often.</p>
<h2>Why bother converting to Markdown at all?</h2>
<ul>
<li><strong>Docs and READMEs.</strong> Most static site generators and Git hosts render Markdown natively.</li>
<li><strong>Notes.</strong> Markdown files stay portable across editors and are easy to diff and search.</li>
<li><strong>Static sites.</strong> Migrating old content into a Markdown-based site means getting it out of Word or HTML first.</li>
<li><strong>LLM context.</strong> Headings, lists and tables in plain text are compact and readable, and you avoid pasting a mess of layout noise.</li>
</ul>
<h2>Option 1: Copy-paste (and fix it by hand)</h2>
<p>The default. Open the PDF or web page, select everything, paste it into your editor, and then rebuild the structure yourself.</p>
<p><strong>Good for:</strong> a paragraph or two.</p>
<p><strong>Downsides:</strong> headings become plain lines, lists lose their markers, tables collapse into runs of text, and links usually vanish. PDFs are especially bad, because line breaks follow the page layout rather than the sentences. For anything longer than a page, you spend more time repairing than reading.</p>
<h2>Option 2: Pandoc</h2>
<p><a href="https://pandoc.org/">Pandoc</a> is the reference tool for document conversion, and if you're comfortable on the command line it's hard to beat for Word documents:</p>
<pre><code class="language-bash">pandoc input.docx -t gfm -o output.md --extract-media=./media
</code></pre>
<p><code>gfm</code> gives you GitHub-flavored Markdown, and <code>--extract-media</code> pulls embedded images into a folder. You can also convert HTML you've saved:</p>
<pre><code class="language-bash">pandoc page.html -f html -t gfm -o page.md
</code></pre>
<p><strong>Good for:</strong> repeatable, scriptable conversions, batch jobs in CI, and anyone who wants full control over output options.</p>
<p><strong>Downsides:</strong> you need to install and configure it. It doesn't read PDFs as input, so PDFs need a separate extraction step first. For a web page you have to download the HTML yourself, and you will often get navigation, footers and other page chrome mixed in with the article.</p>
<h2>Option 3: Other command-line and library routes</h2>
<p>For PDFs, people often chain a text extractor (like <code>pdftotext</code> from poppler-utils) with some manual formatting:</p>
<pre><code class="language-bash">pdftotext -layout spec.pdf spec.txt
</code></pre>
<p>That gives you the text, but not Markdown structure. You still have to add headings and lists yourself. Scanned PDFs are another story: they're images, so you need OCR before any of this works.</p>
<p><strong>Good for:</strong> quick text extraction when structure doesn't matter much.</p>
<h2>Option 4: Online converters</h2>
<p>Browser-based converters trade control for convenience: upload a file or paste a URL, get Markdown back. Nothing to install, which matters when you're on a borrowed machine or helping a non-technical teammate.</p>
<p>Things worth checking with any online converter:</p>
<ul>
<li>Which formats it actually accepts (many only handle one or two).</li>
<li>Whether it keeps headings, lists, links and tables.</li>
<li>What it does with your files afterwards. Read the privacy page, and don't upload sensitive documents to any web service you haven't vetted.</li>
<li>What the free limits are.</li>
</ul>
<h2>The one I built: doctomd</h2>
<p>This is the gap I wanted to fill for myself, so I built <a href="https://doctomd.com/?utm_source=devto&amp;utm_medium=article&amp;utm_campaign=backlinks">doctomd</a>. It runs in the browser. You upload a Word (.doc/.docx), PDF, Excel, PowerPoint, EPUB, HTML, CSV or JSON file, or paste a public web page URL, and you can preview, copy or download the result as a <code>.md</code> file.</p>
<p>What it keeps: headings, emphasis, lists, links, simple tables and images, <strong>when the source file exposes them</strong>.</p>
<p>To be upfront about the limits:</p>
<ul>
<li><strong>Complex layouts need manual editing.</strong> Multi-column PDFs, nested tables and heavily designed documents won't come out perfect.</li>
<li><strong>Scanned PDFs need OCR</strong>, which is only on the paid plans. The free tier works on text-based PDFs.</li>
<li><strong>The free tier is small:</strong> 3 conversions per day without an account, files up to 10MB, PDFs up to 3 pages. Paid passes raise that to 20 or 50 conversions per day, with bigger files and longer PDFs. They are one-time payments, not subscriptions.</li>
<li><strong>Files are processed temporarily and removed after conversion</strong>, but I'd still say: don't upload highly sensitive or regulated documents to it, or to any online converter.</li>
<li>It is not scriptable the way Pandoc is. If you're converting hundreds of files in a pipeline, use Pandoc.</li>
</ul>
<h2>So which should you use?</h2>
<table>
<thead>
<tr>
<th>Situation</th>
<th>What I'd reach for</th>
</tr>
</thead>
<tbody><tr>
<td>A paragraph or two</td>
<td>Copy-paste</td>
</tr>
<tr>
<td>Many Word/HTML files, in a script or CI</td>
<td>Pandoc</td>
</tr>
<tr>
<td>Just the raw text of a PDF</td>
<td><code>pdftotext</code></td>
</tr>
<tr>
<td>A one-off PDF, DOCX or web page, no setup</td>
<td>An online converter such as doctomd</td>
</tr>
<tr>
<td>Scanned PDF</td>
<td>Any tool with OCR, then a manual pass</td>
</tr>
</tbody></table>
<p>My own split is roughly this: Pandoc for anything repeatable, a browser converter for the one-off "a client just sent me a PDF" moments, and copy-paste only for tiny snippets.</p>
<h2>A few tips whatever tool you use</h2>
<ol>
<li><strong>Check the heading levels.</strong> Converters often turn a document title into <code>#</code> and everything else into <code>##</code>, or the other way round. Fix the hierarchy before publishing.</li>
<li><strong>Look at tables first.</strong> They're the most likely thing to break. Simple tables convert well; merged cells rarely do.</li>
<li><strong>For LLM context, trim before you paste.</strong> Remove repeated headers, footers and page numbers. It saves tokens and helps the model focus.</li>
</ol>
<p>If you have a conversion workflow I haven't covered, I'd like to hear about it in the comments, especially for awkward PDFs.</p>
]]></content:encoded></item></channel></rss>