Convert Latex to HTML online

Yesterday I wanted to convert a snippet of latex code to html. Unfortunately, the results when Googling for “latex to html online” are only cr*p. I knew a tool that was really great at converting latex files to html files. This tool is called Pandoc. However, it seemed like a bit of overhead to always create a file, store the latex snippet, remember what the pandoc command was to convert, enter the entire command (e.g. pandoc mysnippet.tex -o mysnippet.html), open the html file and get the snippet… That’s why I’d much prefer an online tool that does this chore for me. Since I couldn’t find any, I implemented it myself.

This is the result:

It’s open sourced, the code can be found on Github at https://github.com/bersling/latex2html.

It’s a small self-contained piece of code with one html file and one TypeScript file at its core.

But here’s the interesting part, if I hadn’t been so bad at googling, I would have found that there is the exact same functionality available at

… So there might be even a better learning for me than the additional coding experience I gained: Before you build something, Google, google, google if it already exists. For example had I tried googling “convert with pandoc online” this converter would have been the first hit. For me, it was a small price to pay, since I built the solution in little time and it was quite fun, but if you’re working on a larger project and didn’t research what’s already out there, you’re gonna have a bad time.

Leave a Reply

Your email address will not be published.