So, to answer directly, it is entirely safe to keep koi and goldfish in the same tank if you follow some very crucial stipulations.
Both fish are part of the Cyprinidae family and have very similar care requirements as far as general temperature and water filtration goes.
They tend to do quite well together, for the most part, as long as you take a few precautionary concerns into account before introducing them into the same environment.
Koi and Goldfish Size Differences
One of the most important things to consider before adding both fish species into the same tank is sizing.
Goldfish and koi should only be kept together if they are roughly the same size, as if one is smaller than the other there is the potential that the smaller species will be eaten.
Koi and goldfish will eat anything they can fit into their mouths, including other fish if given the chance.
It is how they survive in the wild and is honestly quite an impressive adaptation that allows them to thrive in times of food scarcity.
Due to this, smaller fish must be protected until they are of a size that makes them unappealing as a meal.
Koi fry, especially, are vulnerable, as they are quite tiny.
Fortunately, they are fast growers and will be up to a viable size in a month or two.
Just keep an eye on them and perhaps consider removing them to a separate koi holding tank until they are ready to be reintroduced.
Perhaps the best thing about keeping koi and goldfish together is that they both have rather docile, happy personalities.
They are not aggressive and typically do not actively attempt to attack other fish or provoke fights.
Due to this, goldfish and koi are fantastic tank mates and make for a rather easy upkeep that is low stress and free of violence and aggression, for the most part.
Of course, some fish will be more easily agitated than others but, for the most part, this trait is minimal in both species.
So, it is quite well known that koi are not particularly suitable for tanks in general.
They can get over two feet long and are absolutely massive, making a safe and comfortable tank that provides a humane amount of space quite hard to obtain and maintain.
It is almost unheard of outside of professional and aquarium settings.
Still, you can keep koi in a tank for a short while.
You should not think of it as a long term or permanent option, as this type of environment for the entirety of a koi’s life would be inhumane and extremely stressful for the fish.
Koi need to be kept in large tanks even as small fish.
Once they are six inches they should absolutely be moved to a pond setup, as almost any tank will be inadequate at that point.
When setting up a koi and goldfish tank, make sure to add substrate to the bottom of the tank.
Both fish are bottom feeders, so the substrate will help give them a place to munch about. Additionally, hides are a good idea incase the fish want to get away from one another for a bit.
Water heaters and good filtration is a must, as they both cannot handle significant temperature drops and are high waste fish, meaning they produce a lot of waste that can elevate the ammonia levels in the tank if not filtered properly.
When keeping koi in a fish tank, you have to ensure that you are creating an environment that is capable of supporting them until they are maxed out and need to be rehoused in a permanent enclosure.
A frequently overlooked aspect of fishkeeping, breeding is important to take into account before you set up your tank and end up with dozens of fry on your hands.
While koi are not as big of an issue, goldfish can produce young many times per year, meaning their numbers can multiply rapidly.
Additionally, koi and goldfish can actually interbreed, creating a hybrid species.
These hybrid fry are sterile and have quite a few different defining characteristics that set them apart from their parental species.
They are viable fish, they simply cannot mate.
You need to take into account your ability to care for additional fish and make sure your tank is ready for more or that you have someone who can take them.
Alternatively, you could opt to seek out one gender of fish to quell the problem completely.
Keeping koi and goldfish together can create a colorful, rich environment that is an absolute joy to have.
Just be sure to create a safe habitat and prepare for their care and you are all set!