Accidentally, unintentionally, inadvertently, by chance, by mistake, unwittingly, haphazardly, coincidentally, fortuitously, casually, unexpectedly, serendipitously, inadvertently, unconsciously, randomly, coincidentally, incidentally, unawares, unexpectedly. These words can be used interchangeably with "by accident" to indicate that something was not done on purpose or by design. Whether it was an unintended outcome, a chance occurrence, or a simple mistake, these synonyms offer additional nuance and variety to the phrase. So, next time you want to describe a situation where something happened unexpectedly, consider using one of these alternative options.