Does electrolysis of aqueous tin(II) chloride produce Cl₂, SnCl₄ or both?

When applying a current to an aqueous solution of tin(II) chloride, tin crystals grow from the cathode. However, I'm not sure about the anode. It seems like there are two possible reactions:

$$\ce{2 Sn^2+(aq) + 4 Cl-(aq) -> Sn(s) + SnCl4(aq)}$$

and

$$\ce{Sn^2+ (aq) + 2 Cl- (aq) -> Sn(s) + Cl2}$$

Online sources that I've found — including an educational lab and YouTube videos of the experiment being performed — give inconsistent answers. I'm thinking that both products are produced; if that is the case, how can I predict exactly how much of each will be produced? Can other factors, e.g. current, electrode material, pH change the results?

Let's try to look at those electrons. C - cathode, A - anode.

\begin{align} &\mathrm{C(-):} &\ce{Sn^2+ + 2e- &→ Sn^0} \\ &\mathrm{A(+):} &\ce{2Cl^- &→ Cl2^0 + 2e-} \end{align}

So, your second reaction is right. But the first is wrong: $$\ce{Sn}$$ is reduced, but there are no oxidation. You should use

$$\ce{Sn + 2 Cl2 → SnCl4}$$

But I should mention that this reaction is for $$\pu{115 °C}$$, so don't worry, it won't go for your conditions.

Another way is

$$\ce{SnCl2 + Cl2 → SnCl4}$$

It requires a lot of work, bubbling $$\ce{Cl2}$$ through aqueous solution and distillation in the end, so you also shouldn't worry.

You can basically think that all you $$\ce{Sn}$$ that becomes a part of new structure goes into solid $$\ce{Sn}$$. It's acceptable since synthesis of $$\ce{SnCl4}$$ is not an easy thing.