A complete web equation editor – with first-class Arabic support.
Click or type a formula and export it as a crisp PNG image – ready for documents, slides and the web. Free to use online – and offline once you install it as an app. Full English interface out of the box – and, as a feature of its own, right-to-left Arabic with the Arabic math letters.
60-second tour, no sound · watch it in full quality (MP4)
Features · Turn on Arabic · Arabic mathematics · Quick start · Use it on your site · Documentation
Try it online → mohammad-erhim.github.io/math-type-x (install it to use it offline) · بالعربية
- It feels like a word processor for equations. A toolbar with 700 ready-made structures, a keyboard shortcut for everything, and a live preview – no code to learn.
- Complete in English, outstanding in Arabic. The full editor works in English; switch to Arabic and the whole interface, the typing rules, the layout and the exports work right to left, with Arabic mathematical letters built in.
- Your formulas are yours. Everything is stored as standard MathML, so it works in web pages, e-books and other editors, and exports to PNG images.
- Nothing to install – or install it as an app. It is a web page that runs in any modern browser on a computer, a tablet or a phone. Add it to your home screen or desktop and it opens straight to the editor in its own window and works offline.
Arabic is one switch away – pick the way that suits you:
1. Start in Arabic. Open the editor with ?lang=ar in the address (for example http://localhost:8080/?lang=ar), or pass
language: 'ar' when you embed it. The interface is translated and right-to-left editing is already on.
2. Already in English? Use the three numbered buttons of the General tab:
- Right to left editing – formulas grow from the right and structures are mirrored. Click again to go back to left to right.
- Arabic ligature – the Arabic letters you type join into one connected word. Leave it off to keep every letter separate, the way variables are written in a formula.
- Insert special characters – opens the character panel; choose Arabic math letters in the list to get the Arabic mathematical letters and the derivative marks.
For Arabic-Indic digits (٠١٢٣…) open the Greek, letters and numbers tab and use the numeral buttons.
On top of the full English editor, Arabic gets dedicated support: the interface, the typing, the layout, the symbols and the exports. See Turn on Arabic for how to switch.
- Right-to-left editing. Formulas grow from the right. Fractions, roots, powers, matrices and brackets are mirrored the way Arabic mathematics is printed, and the toolbar, pop-ups and output panel follow.
- Arabic interface. Every tab, tooltip, dialog and panel is translated.
- Arabic digits and letters. Type with your Arabic keyboard; digits default to Arabic-Indic (٠١٢٣…), and the numeral buttons of the toolbar also offer Western and Eastern Arabic-Indic digits.
- Arabic fonts. Choose Noto Naskh, Noto Sans Arabic, Noto Kufi Arabic or Tajawal for Arabic text. The same fonts are used in the editor and in every export, so what you see is what you get.
- Arabic function names and calculus. Controls that carry a differential use the Arabic letter, and common functions appear with their Arabic names.
A palette of Arabic mathematical letters – the shapes used in printed Arabic mathematics – is one click away (Insert special characters). They are drawn as vector shapes, so they look the same on every device and in every exported image, with no font to install.
They are aligned to sit on the same line as ordinary Arabic text. Here every ordinary letter is followed by its math letter:
The same palette has the 1, 2 and 3 derivative marks. Put them above a letter and they stand clear of it, never touching or crossing it; stack more marks as high as you need.
Printed mathematics sometimes needs a mark or a letter to sit a pixel or two away from where an automatic layout puts it. Select anything – a letter, a mark, a whole group – and open the contextual tab: four arrows move it pixel by pixel. The offset is saved inside the formula (as standard MathML), so it survives copy and paste and appears in every export.

Moving a mark three pixels right and three up – the offset is saved in the formula.
- Click the arrows in the contextual tab, or press Ctrl + Shift + an arrow key.
- Several selected elements move together.
- There is a separate control, Elements stacked, same size (Scripts and layout tab), for two items one above the other at full size – nest it for as many levels as you need.
MathTypeX is an installable web app (PWA). Install it once and it opens like any other app, straight to the editor, even with no internet connection.
| Where | How |
|---|---|
| Android – Chrome | Tap the Install app button (the download icon in the bottom bar of the phone editor, or the button on the website), or use the browser menu → Install app |
| iPhone and iPad – Safari | Share → Add to Home Screen |
| Windows, Mac, Linux – Chrome or Edge | Install app in the editor's top bar or on the website, or the install icon in the address bar |
- Works offline. After the first visit the pages, the editor, its fonts and the image export are saved on the device by a service worker. Equations, PNG / SVG export and conversions all run in the browser, so nothing needs a connection.
- Only the editor. The installed app shows the editor and the language switch – no website menu, no home link, no install button. Any website page opened inside the app goes to the editor in the same language.
- Always current. While you are online the app asks for a fresh copy of each page, and a new version replaces the saved one (no manual update). The install button appears only when the browser offers the installation.
- Private. The saved files are the public site files; no equation or personal data is in them.
On small screens the editor switches to a fluid layout: bigger touch targets, an on-screen arrow pad (the soft keyboard has none), and the output as a slide-up bar. In the full-page editor:
- the text area gets the whole height – there is no top bar, the language switch sits next to Export in the bottom bar, and that bar steps aside while the keyboard is open;
- tabs, toolbar and text area share the same width; long palettes wrap into rows that fit the screen and the periodic table is shown whole;
- the export footer is one line: White | Transparent background, Share, Copy, Download;
- leaving by the logo or the language button, and clearing the formula, ask for confirmation first;
- in Arabic the tabs and the toolbar start from the right, and switching language resets the language options (direction, font, Arabic ligature, digits) to the new language's defaults – your equation stays.
You need Node.js 22 or newer.
npm install
npm run build
npm startOpen http://localhost:8080 – the editor and its output panel are ready. Add ?lang=ar for the Arabic interface.
| Useful keys | |
|---|---|
| Alt + 1 … 9, 0 | Switch toolbar tab (0 is the contextual tab) |
| Ctrl + / | Fraction |
| Ctrl + ↑ / ↓ | Superscript / subscript |
| Shift + arrows | Select |
| Ctrl + Shift + arrows | Move the selection by one pixel |
No server? npm run build:static produces plain files you can host anywhere (GitHub Pages, Netlify and others); the editor then
makes its images and conversions in the browser.
<div id="editorContainer"></div>
<script src="editor.js"></script>
<script>
const editor = MathTypeX.JsEditor.newInstance({ language: 'ar' }); // or 'en'
editor.insertInto(document.getElementById('editorContainer'));
editor.on('change', (e) => console.log(e.mathml)); // the formula as MathML
</script>Read the formula with editor.getMathML(), getLaTeX(), getSVG(), getPNG() or getAccessibleText(); set one with
setMathML(). The full API is in the technical reference.
| Technical reference | Build and deploy, source layout, embedding API, HTTP services, how it is tested, known differences |
| Architecture | How the editor, layout engine and services fit together |
| Services | The HTTP services behind images and conversions |
| Testing | Test suites and how to extend them |
| Changelog · Contributing | Release notes · how to help |
The Arabic math letters are shapes from the symbol tables of the Zulfi Math Arabic keyboard maps. Formulas are drawn with the bundled STIX Two Math, Liberation Sans and Noto Arabic faces.








