Wiris

Documentation / MathType

  • Demos
  • Visit our website
  • Downloads
  • Contact us
  • MathType

    • WirisQuizzes

      • Nubric

        • CalcMe

          • MathPlayer

            • Store FAQ

              • MathFlow

                • BF FAQ

                  • Miscellaneous

                    • Wiris Integrations

                      • Home
                      • MathType
                      • Technical documentation
                      • MathType for HTML editors
                      • Reference
                      • API services

                      Conversion services reference

                      Reading time: 2min

                      Reference for the MathType conversion services used to convert mathematical expressions between supported formats.

                      Summary

                      The MathType conversion services transform mathematical expressions between Presentation MathML, Content MathML, and LaTeX. These services are useful when integrating MathType with applications that store, exchange, or process mathematical content in different formats.

                      Supported services

                      Service Description
                      latex2mathml Converts LaTeX to Presentation MathML.
                      mathml2latex Converts Presentation MathML to LaTeX.
                      mathml2content Converts Presentation MathML to Content MathML.
                      content2mathml Converts Content MathML to Presentation MathML.

                      Conversion overview

                      Available interfaces

                      Conversion services are available via the following interfaces.

                      Interface Availability
                      HTTP endpoints Cloud and self-hosted deployments
                      Java API Self-hosted Java deployments
                      .NET API Self-hosted .NET deployments

                      HTTP endpoints

                      The endpoint URL depends on your deployment. The endpoint path corresponds to the service name. For example:

                      Service Example endpoint (Java)
                      latex2mathml /pluginwiris_engine/app/latex2mathml
                      mathml2latex /pluginwiris_engine/app/mathml2latex
                      mathml2content /pluginwiris_engine/app/mathml2content
                      content2mathml /pluginwiris_engine/app/content2mathml

                      Both GET and POST requests are supported. POST is recommended for large MathML or LaTeX expressions.

                      Request parameters

                      All conversion services accept the following request parameters.

                      Parameter Required Description
                      mml Yes* MathML expression to convert.
                      latex Yes* LaTeX expression to convert.
                      httpstatus No Returns HTTP 5xx status codes when the conversion fails instead of embedding the error in a successful (200 OK) response.

                      * The required parameter depends on the selected service:

                      Service Required parameter
                      latex2mathml latex
                      mathml2latex mml
                      mathml2content mml
                      content2mathml mml

                      Example request

                      Convert a LaTeX expression to Presentation MathML:

                      GET /latex2mathml?latex=\frac{1}{2}

                      Convert Presentation MathML to Content MathML:

                      GET /mathml2content?mml=<math><mn>1</mn><mo>+</mo><mn>2</mn></math>

                      Service behaviour

                      latex2mathml

                      Converts a LaTeX expression into Presentation MathML. This service supports mathematical LaTeX via MathType.

                      See LaTeX support for compatibility information.

                       

                      mathml2latex

                      Converts Presentation MathML into LaTeX. The generated LaTeX closely represents the mathematical meaning of the input expression.

                      mathml2content

                      Converts Presentation MathML into Content MathML. This service is commonly used before semantic processing or expression evaluation.

                      See Content MathML for more information.

                       

                      content2mathml

                      Converts Content MathML into Presentation MathML. This service produces MathML suitable for editing or rendering with MathType.

                      Error handling

                      Conversion may fail if:

                      • The supplied MathML is malformed.
                      • The supplied LaTeX is not supported.
                      • The expression cannot be converted to the requested format.

                      When httpstatus=true is specified, the service returns an appropriate HTTP 5xx status code instead of embedding the error in a successful (200 OK) response.

                      Notes

                      • mathml2content and content2mathml convert between Presentation and Content MathML.
                      • latex2mathml and mathml2latex convert between LaTeX and Presentation MathML.
                      • Conversion preserves the mathematical meaning of the expression whenever possible.
                      • Some LaTeX constructs or Content MathML expressions may not have an exact equivalent in the target format.

                      Java and .NET APIs

                      The services described in this article are also available through the Java and .NET APIs. For complete method signatures, return types, and implementation details, see:

                      • Java API reference.
                      • .NET API reference.

                      Related articles

                      • MathType API services.
                      • LaTeX support.
                      • Content MathML.
                      • MathML coverage reference.
                      • Expression evaluation.

                      Was this article helpful?

                      Give feedback about this article

                      Related Articles

                      • Equation conversion process from MathType 7 to MathType Add-in for Microsoft 365
                      • MathType Equations Are Converted to Microsoft Word Equations When Pasting

                      Conversion services reference

                      Summary Supported services Conversion overview Available interfaces HTTP endpoints Request parameters Example request Service behaviour latex2mathml mathml2latex mathml2content content2mathml Error handling Notes Java and .NET APIs Related articles

                      Empowering STEM education

                      MathType

                      • Office Tools
                      • LMS
                      • XML
                      • HTML

                      WirisQuizzes

                      Nubric

                      Integrations

                      Solutions

                      • Education
                      • Publishing houses – platforms and interactive
                      • Publishing houses – Print and digital
                      • Technical writers

                      Pricing

                      Downloads

                      Blog

                      • Success stories

                      About us

                      • Careers
                      • Partnership

                      Contact Us

                      Contact Sales

                      European union (European Regional Development Fund) and 1EdTech (TrustEd Apps Certified)
                      • Cookie Policy
                      • Terms of Use
                      • Privacy Policy / GDPR
                      • Student Data Privacy
                      • Compliance
                      • Cookie Settings

                      © Wiris 2026

                      Expand