Units of the Scalar field theory Lagrangian density The Lagrangian (with units $J$) connects to the Lagrangian density (with units $J/m^3$) as:
$$
L=\iiint_V \mathcal{L}d^3x
$$

Let $\mathcal{L}$ be the classical Lagrangian density of the scalar free theory (see https://en.wikipedia.org/wiki/Scalar_field_theory):
$$
\mathcal{L}=\frac{1}{2} \eta^{\mu\nu} \partial_\mu \phi \partial_\mu  \phi - \frac{1}{2}m^2 \phi^2
$$
What are the units for each term?

Let me have a go:
I am assuming that $\phi$ has no units.
$$
\mathcal{L}=\underbrace{\frac{1}{2} \eta^{\mu\nu} \partial_\mu \phi \partial_\mu \phi}_\text{no units}  - \underbrace{\frac{1}{2}m^2 \phi^2}_{kg^2}
$$
Clearly, a non-sensical equation.
 A: In field theory, it is assumed that action is dimensionless and so is the speed of light ($\hbar=c=1$). So, we can write everything in terms of the mass unit. From the speed of light being unitless, we get, $[L]= [T]$ and from action being unitless we get, $[M]=[L]^{-1}$. In these units, the Lagrangian density has the dimension, $[\mathcal{L}] = [M]^4$. From the mass term in the Lagrangian density, we can find the units of the field $\phi$, $$[\phi] = [M].$$ To check whether the first term is consistent we should have the dimension of the first term as $[M]^4$.
$$[\partial_\mu \phi] = \frac{[\phi]}{[x]} = \frac{[M]}{[L]} = [M]^2.$$
Remember that the partial derivative has $\partial x^\mu$ in the denominator which has the dimension of length. So, finally the dimension of the first term is $[(\partial_\mu\phi)^2] = [M]^4$, which is the correct dimension as $[\mathcal{L}] =[M]^4$.
So, there are two misconceptions in your assumptions. $\phi$ is not unitless and the form of Lagrangian density is not written in SI units, it is written in what is called natural units with $\hbar = c = 1$.
A: So my take.. Your lagrangian is given in natural units, then the action should be dimensionless. The lagrangian density should be a density in spacetime for relativistic field theory, which this seems to be. Then the units of the lagrangian density should be $\sim $M$^4$, where M is mass, because in natural units, distance $\sim $M$^{-1}$. Then both terms have the correct units if $\phi\sim$ M.
You could then convert to appropriate units if you don't like natural ones.
