We investigate systematically dimension-9 operators in the standard model effective field theory which contains only standard model fields and respects its gauge symmetry. With the help of the Hilbert series approach to classifying operators according to their lepton and baryon numbers and their field contents, we construct the basis of operators explicitly. We remove redundant operators by employing various kinematic and algebraic relations including integration by parts, equations of motion, Schouten identities, Dirac matrix and Fierz identities, and Bianchi identities. We confirm counting of independent operators by analyzing their flavor symmetry relations. All operators violate lepton or baryon number or both, and are thus non-Hermitian. Including Hermitian conjugated operators there are $$ {\left.384\right|}_{\Delta B=0}^{\Delta L=\pm 2}+{\left.10\right|}_{\Delta B=\pm 2}^{\Delta L=0}+{\left.4\right|}_{\Delta B=\pm 1}^{\Delta L=\pm 3}+{\left.236\right|}_{\Delta B=\pm 1}^{\Delta L=\mp 1} $$
384
Δ
B
=
0
Δ
L
=
±
2
+
10
Δ
B
=
±
2
Δ
L
=
0
+
4
Δ
B
=
±
1
Δ
L
=
±
3
+
236
Δ
B
=
±
1
Δ
L
=
∓
1
operators without referring to fermion generations, and $$ {\left.44874\right|}_{\Delta B=0}^{\Delta L=\pm 2}+{\left.2862\right|}_{\Delta B=\pm 2}^{\Delta L=0}+{\left.486\right|}_{\Delta B=\pm 1}^{\Delta L=\pm 3}+{\left.42234\right|}_{\Delta B=\mp 1}^{\Delta L=\pm 1} $$
44874
Δ
B
=
0
Δ
L
=
±
2
+
2862
Δ
B
=
±
2
Δ
L
=
0
+
486
Δ
B
=
±
1
Δ
L
=
±
3
+
42234
Δ
B
=
∓
1
Δ
L
=
±
1
operators when three generations of fermions are referred to, where ∆L, ∆B denote the net lepton and baryon numbers of the operators. Our result provides a starting point for consistent phenomenological studies associated with dimension-9 operators.