Axiomatic definition of groups To define natural numbers one can either:

use the Peano axioms in second-order logic;

encode them in set theory as von Neumann ordinals.


The relation between those two definitions of natural numbers is that
(2) satisfies (1).
Now, groups are usually defined as sets equipped with operations and axioms. This is akin to (2) above since it is an encoding of groups in set theory.
What would be a definition of groups akin to (1)?
This is too long for a comment. Given the negative reception of the current answers, and the confusion on the original question, I thought I would add what I think is being asked, and why the current answers don't work. (For what it's worth, I did not downvote either answer.)
It appears to me that the OP is trying to compare the class of all groups to the set of natural numbers. In other words, a single group is compared to a single natural number. This is why it is claimed that the definition of groups via axiomatization is akin to (2), rather than (1). Specifically:

Given a model $M$ of ZF, one can define which sets in $M$ are  natural numbers using the von Neumann definition: a set is a natural number if and only if blah blah...

Given a model $M$ of ZF, one can define which pairs of sets in $M$ are groups (where the pair consists of the underlying set of the group and the graph of the binary operation) using straightforward axioms: a pair of sets is a group if and only if blah blah...


There are some problems with this, as pointed out in Ned's comment. For example the natural numbers don't change depending on the model of ZF, while on the other hand different models of ZF could disagree about which groups they contain. But even still, the analogy does make sense.
On the other hand, the current answers make a comparison between the set of natural numbers and a particular group (rather than the class of all groups). So this doesn't seem to be what the OP is after in something akin to (1).
In my estimation, something akin to (1) would be an axiomatic theory $T$ which fits the analogy
$$
\text{ $T$ : group :: Peano axioms : natural number}
$$
So the class of groups would somehow be the &quot;standard model&quot; of $T$ (whatever that might mean) in the same way the natural numbers are the standard model of PA. But already there are issues with how to make this precise. At the very least, I think one would want to represent groups as isomorphism classes or presentations, rather than sets. Then one could make some &quot;meta-axiomatizations&quot; of special sets of group presentations. For example, one could &quot;axiomatize&quot; sets of group presentations that contain the finite cyclic groups and are closed under direct product. Then the finite abelian groups would be something like the &quot;standard model&quot;. But this is not nearly rigorous enough.
So I don't know what the right answer is, or if there is a good answer at all. Hopefully what I've said isn't total nonsense, and I haven't misconstrued the original intent of the question.
Side note: The collection of finite von Neumann ordinals is a set, but the collection of all groups (up to isomorphism) is a proper class, unless you want to restrict yourself to finite groups.
The finite von Neumann ordinals are natural numbers in the sense that $\langle \omega, \varnothing, x \mapsto x \cup \{x\} \rangle \models \langle \mathbb{N}, 0, S \rangle$. How do you expect elements of your &quot;class of groups&quot; to relate to each other?
For groups $G$ and $H$, let $G \sim H$ if they are isomorphic. Let
$$\mathrm{Grp} = \{\langle S, \bullet \rangle \mid S \in V, \bullet \in S \times S \rightarrow S, \text{$\bullet$ satisfies the group axioms}\}$$
be the class of all groups, where $V$ is the class of all sets. Is the quotient $\mathrm{Grp} / {\sim}$ what you're looking for? See Scott's trick for equivalence classes on a proper class.
Or are you perhaps looking for something like a &quot;canonical encoding&quot; of the finite groups, like the finite von Neumann ordinals are a &quot;canonical encoding&quot; of the natural numbers?