  We constrain the equation of state of quark stars within the Bayesian
statistical approach using the mass and radius measurements of PSR J0030+0451
from NICER. Three types of bag models, with and without non-zero finite quark
mass and/or superfluidity, are employed for quark stars made up with self-bound
strange quark matter. We find the $90\%$ posterior credible boundary around the
most probable values of the quark star maximum mass is $M_{\rm
TOV}=2.38_{-0.23}^{+0.26}\,M_{\odot}$, within the model flexibility of the
finite quark mass, the quark pairing gap, and the perturbative contribution
from the one-gluon exchange. The radius of a canonical $1.4\,M_{\odot}$ quark
star is $R_{\rm 1.4}\sim12.3\,{\rm km}$, smaller than the results based on
neutron star models.
