Hyperovals in PG(2, GF(q)) with even q are maximal arcs and an interesting research topic in finite geometries and combinatorics. Hyperovals in PG(2, GF(q)) are equivalent to [q + 2, 3, q] MDS codes over GF(q), called hyperoval codes, in the sense that one can be constructed from the other. Ovals in PG(2, GF(q)) for odd q are equivalent to [q + 1, 3, q − 1] MDS codes over GF(q), which are called oval codes. In this paper, we investigate the binary subfield codes of two families of hyperoval codes and the p-ary subfield codes of the conic codes. The weight distributions of these subfield codes and the parameters of their duals are determined. As a byproduct, we generalize one family of the binary subfield codes to the p-ary case and obtain its weight distribution. The codes presented in this paper are optimal or almost optimal in many cases. In addition, the parameters of these binary codes and p-ary codes seem new.Conversely, the column vectors of a generator matrix of any MDS [q + 2, 3, q] code over GF(q) form a hyperoval in PG(2, GF(q)). Thus constructing hyperovals in PG(2, GF(q)) is equivalent to constructing [q + 2, 3, q] codes over GF(q). Therefore, every [q + 2, 3, q] code over GF(q) is called a hyperoval code.A conic in PG(2, GF(q)) is a set of q + 1 points of PG(2, GF(q)) that are zeros of a nondegenerate homogeneous quadratic form in three variables. It is known that a conic is an oval in PG(2, GF(q)) and an oval in PG(2, GF(q)) is a conic if q is odd [2]. Hence, conics and ovals in PG(2, GF(q)) are the same when q is odd. Let q be odd. Define O = {(x 2 , x, 1) : x ∈ GF(q)} ∪ {(1, 0, 0)}.