Let V Bn, resp. W Bn denote the virtual, resp. welded, braid group on n strands. We study their commutator subgroups V B ′ n = [V Bn, V Bn] and, W B ′ n = [W Bn, W Bn] respectively. We obtain a set of generators and defining relations for these commutator subgroups. In particular, we prove that V B ′ n is finitely generated if and only if n ≥ 4, and W B ′ n is finitely generated for n ≥ 3. Also we prove that, and for n ≥ 5 the commutator subgroups V B ′ n and W B ′ n are perfect, i. e. the commutator subgroup is equal to the second commutator subgroup.