How to Use Math on Google Sites (Without Losing Your Mind)

Google Sites doesn't actually have a native LaTeX or equation editor built in. You can't just type a formula and have it render properly. At least, not directly. That's the first thing you need to understand before anything else. The workarounds are all external tools that feed into Sites somehow. I've spent years setting this up for people who need their course pages or departmental sites to display equations, proofs, or any kind of mathematical content. Here's how it actually works in practice.

Math Google Sites

The most reliable method involves using MathJax or KaTeX. Both are JavaScript libraries that render LaTeX code into beautifully typeset math on a webpage. You add them through Google Sites' embed feature, point them at your equations, and you're done. I recommend starting with KaTeX because it loads significantly faster than MathJax. For a page with twenty equations, MathJax can add roughly 3-5 seconds to the initial load time. KaTeX does it in under a second. The rendering quality is comparable. Here's the process. You create a free account on a service like CodePen, Glitch, or jsFiddle, paste in the KaTeX CDN links and your LaTeX code, get the output URL, and then embed that URL inside Google Sites using the embed block. It takes about ten minutes the first time. After that, it's basically instant. I set this up for a professor last year who needed to embed differential equations on her site. She tried the Google Sites equation insert at first, which doesn't exist, wasted two hours, then came to me. The whole process from start to finish was maybe fifteen minutes once we had the KaTeX embed working. The real bottleneck isn't the technical setup. It's learning enough LaTeX to write your equations correctly. You don't need to be fluent. You need to know the basics: fractions, subscripts, superscripts, integrals, summation notation, and Greek letters. The command syntax looks like \frac{a}{b} for fractions and \sum_{i=0}^{n} x_i for summations. You can paste LaTeX snippets from Stack Exchange or Wikipedia articles if you don't know how to write something yourself. That's totally fine. Another approach that some people prefer is generating PNG images of their equations using an online LaTeX editor like Overleaf or the portable tex renderer at latex.to/a, then uploading those images into Google Sites. This is simpler technically but has real drawbacks. The images aren't responsive. They look blurry on Retina displays. And when the site gets indexed by search engines, there's zero text content around the equations, which tanks your SEO. I switched one of my project pages from image-based equations to KaTeX embeds and saw the page load time drop from four seconds to less than one. Not counting the time it took to rewrite everything in LaTeX, which was already mostly done from the Overleaf document I was pulling from. A thing most people miss: Google Sites does support embedding Google Sheets with formulas in them. If you're dealing with something computational rather than typographical, like a table of values generated from a formula, you can just insert a Sheets block and set it to display the cell formulas. The catch is that it only shows the results to viewers unless they click into the sheet. The formulas aren't visible on the page itself. I ran into a problem once where I needed the audience to see both the formula and the computed output simultaneously on a single page. What I ended up doing was creating the Sheet with the formula in one column and the result in the next, then embedding the Sheet with the formula column visible but grayed out using conditional formatting. It's a workaround that looks clean enough that nobody ever asks about it. Took me about an hour to get it right the first time. Now I do it in twenty minutes. There's also the option of using the Google Apps Script integration to inject MathJax directly into your Sites pages without relying on external embeds. This is more involved and requires writing a small script that runs on page load. I wouldn't recommend it unless you're maintaining a large site with dozens of math-heavy pages. For a one-off or a small course site, the KaTeX embed method is faster and easier to debug. One more thing worth noting: Google Sites caches embedded content aggressively. If you update your equations and they're not showing up correctly, clear the browser cache or try loading the page in an incognito window. I wasted about twenty minutes once thinking my embed had broken. It was just cached content from three days ago. If you need something more powerful than what Google Sites can handle, consider switching to a static site generator like Jekyll with KaTeX built in, or WordPress with a proper math plugin. But if you're stuck with Google Sites because your institution requires it, the KaTeX embed route is your best option and it works well enough for most use cases.