Doctor can evaluate
If a toe is swollen from trauma, one can try to move the joints of the toe.
If the joints are movable in the normal directions, without crunching noises, without severe pain, then it is probably not broken. If the toe is crooked, has great pain when moved, or looks shorter than normal, it probably is broken. Many times it is hard to tell without an x-ray, so a doctor's evaluation may be needed.